| 136 | | if (pRODUKCJABindingSource.Current != null) |
| 137 | | { |
| 138 | | wylaczSortowanieGrida(); |
| 139 | | |
| 140 | | DataRowView row = (DataRowView)pRODUKCJABindingSource.Current; |
| 141 | | |
| 142 | | REKLAMADataSet.PRODUKCJADataTable t = pRODUKCJATableAdapter.GetDataById(Convert.ToInt32(row["ID"])); |
| 143 | | |
| 144 | | if (!t[0].IsDATA_PRODUKCJANull()) |
| 145 | | { |
| 146 | | MessageBox.Show("Zlecenie jest ju¿ przekazane do DTP.\nWidok zostanie odwie¿ony.", "Baza Reklam - Produkcja", MessageBoxButtons.OK); |
| | 136 | if (pRODUKCJABindingSource.Current == null) return; |
| | 137 | |
| | 138 | wylaczSortowanieGrida(); |
| | 139 | |
| | 140 | DataRowView row = (DataRowView) pRODUKCJABindingSource.Current; |
| | 141 | |
| | 142 | REKLAMADataSet.PRODUKCJADataTable t = pRODUKCJATableAdapter.GetDataById(Convert.ToInt32(row["ID"])); |
| | 143 | |
| | 144 | if (!t[0].IsDATA_PRODUKCJANull()) |
| | 145 | { |
| | 146 | MessageBox.Show("Zlecenie jest ju¿ przekazane do DTP.\nWidok zostanie odwie¿ony.", |
| | 147 | "Baza Reklam - Produkcja", MessageBoxButtons.OK); |
| | 148 | wlaczSortowanieGrida(); |
| | 149 | RefreshGrid(); |
| | 150 | return; |
| | 151 | } |
| | 152 | |
| | 153 | row["PRODUKCJA"] = User.Instance().Login; |
| | 154 | row["DATA_PRODUKCJA"] = DateTime.Now; |
| | 155 | // na koncu,bo moze byc sortowanie po stanie |
| | 156 | row["stan"] = "DO DTP"; |
| | 157 | pRODUKCJABindingSource.EndEdit(); |
| | 158 | pRODUKCJATableAdapter.Update(rEKLAMADataSet.PRODUKCJA); |
| | 159 | ZablokujButtony(); |
| | 160 | |
| | 161 | wlaczSortowanieGrida(); |
| | 162 | } |
| | 163 | |
| | 164 | private void proToolStripButton_Click(object sender, EventArgs e) |
| | 165 | { |
| | 166 | if (pRODUKCJABindingSource.Current == null) return; |
| | 167 | |
| | 168 | wylaczSortowanieGrida(); |
| | 169 | |
| | 170 | DataRowView row = (DataRowView) pRODUKCJABindingSource.Current; |
| | 171 | |
| | 172 | REKLAMADataSet.PRODUKCJADataTable t = pRODUKCJATableAdapter.GetDataById(Convert.ToInt32(row["ID"])); |
| | 173 | |
| | 174 | if (!t[0].IsDTPNull()) |
| | 175 | { |
| | 176 | DialogResult dialogResult = MessageBox.Show("Zlecenie jest ju¿ w DTP. Czy chcesz je przej¹æ?", |
| | 177 | "Baza Reklam - Produkcja", |
| | 178 | MessageBoxButtons.YesNo); |
| | 179 | if (dialogResult == DialogResult.No) |
| | 180 | { |
| 151 | | |
| 152 | | row["PRODUKCJA"] = User.Instance().Login; |
| 153 | | row["DATA_PRODUKCJA"] = DateTime.Now; |
| 154 | | // na koncu,bo moze byc sortowanie po stanie |
| 155 | | row["stan"] = "DO DTP"; |
| | 185 | } |
| | 186 | |
| | 187 | row["DTP"] = User.Instance().Login; |
| | 188 | row["DATA_DTP"] = DateTime.Now; |
| | 189 | // na koncu,bo moze byc sortowanie po stanie |
| | 190 | row["stan"] = "W DTP"; |
| | 191 | |
| | 192 | pRODUKCJABindingSource.EndEdit(); |
| | 193 | pRODUKCJATableAdapter.Update(rEKLAMADataSet.PRODUKCJA); |
| | 194 | ZablokujButtony(); |
| | 195 | |
| | 196 | wlaczSortowanieGrida(); |
| | 197 | } |
| | 198 | |
| | 199 | private void doKorektyToolStripButton_Click(object sender, EventArgs e) |
| | 200 | { |
| | 201 | if (pRODUKCJABindingSource.Current != null) |
| | 202 | { |
| | 203 | wylaczSortowanieGrida(); |
| | 204 | |
| | 205 | DataRowView row = (DataRowView)pRODUKCJABindingSource.Current; |
| | 206 | row["stan"] = "DO KOREKTY"; |
| | 207 | |
| 158 | | zablokujButtony(); |
| 159 | | |
| 160 | | wlaczSortowanieGrida(); |
| 161 | | } |
| 162 | | } |
| 163 | | |
| 164 | | private void proToolStripButton_Click(object sender, EventArgs e) |
| 165 | | { |
| 166 | | if (pRODUKCJABindingSource.Current != null) |
| 167 | | { |
| 168 | | wylaczSortowanieGrida(); |
| 169 | | |
| 170 | | DataRowView row = (DataRowView)pRODUKCJABindingSource.Current; |
| 171 | | |
| 172 | | REKLAMADataSet.PRODUKCJADataTable t = pRODUKCJATableAdapter.GetDataById(Convert.ToInt32(row["ID"])); |
| 173 | | |
| 174 | | if (!t[0].IsDTPNull()) |
| 175 | | { |
| 176 | | if ( |
| 177 | | MessageBox.Show("Zlecenie jest ju¿ w DTP. Czy chcesz je przej¹æ?", "Baza Reklam - Produkcja", MessageBoxButtons.YesNo) == |
| 178 | | DialogResult.No) |
| 179 | | { |
| 180 | | return; |
| 181 | | } |
| 182 | | } |
| 183 | | |
| 184 | | row["DTP"] = User.Instance().Login; |
| 185 | | row["DATA_DTP"] = DateTime.Now; |
| 186 | | // na koncu,bo moze byc sortowanie po stanie |
| 187 | | row["stan"] = "W DTP"; |
| 188 | | |
| 189 | | pRODUKCJABindingSource.EndEdit(); |
| 190 | | pRODUKCJATableAdapter.Update(rEKLAMADataSet.PRODUKCJA); |
| 191 | | zablokujButtony(); |
| 192 | | |
| 193 | | wlaczSortowanieGrida(); |
| 194 | | } |
| 195 | | } |
| 196 | | |
| 197 | | private void doKorektyToolStripButton_Click(object sender, EventArgs e) |
| 198 | | { |
| 199 | | if (pRODUKCJABindingSource.Current != null) |
| 200 | | { |
| 201 | | wylaczSortowanieGrida(); |
| 202 | | |
| 203 | | DataRowView row = (DataRowView)pRODUKCJABindingSource.Current; |
| 204 | | row["stan"] = "DO KOREKTY"; |
| 205 | | |
| 206 | | pRODUKCJABindingSource.EndEdit(); |
| 207 | | pRODUKCJATableAdapter.Update(rEKLAMADataSet.PRODUKCJA); |
| 208 | | zablokujButtony(); |
| | 210 | ZablokujButtony(); |