- Pliki:
-
- 1 zmodyfikowane
-
Baza Reklam 2 - Faktury/KalendarzEmisji.cs (zmodyfikowane) (8 diffs)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
Baza Reklam 2 - Faktury/KalendarzEmisji.cs
r2 r23 41 41 short nowaEmisja; 42 42 43 int iloscEmisji; 44 int index = -1; 45 46 public DateTime dataOstatatniejZafakturowanejEmisji = DateTime.Today; 47 48 #region properties 49 43 50 public short NowaEmisja 44 51 { … … 46 53 set { nowaEmisja = value; } 47 54 } 48 int iloscEmisji;49 int index = -1;50 51 #region properties52 55 53 56 public string Tytul … … 66 69 this.reklama = reklama; 67 70 this.emisje = emisje; 68 71 69 72 foreach (DataRow r in emisje.Rows) 70 73 { … … 74 77 } 75 78 } 76 79 77 80 label2.Text = iloscEmisji.ToString(); 78 81 … … 110 113 } 111 114 115 short nr = Emisje.MaxZafakturowanyNrWydania(); 116 117 if (nr != 0) 118 { 119 dataOstatatniejZafakturowanejEmisji = this.sLOWNIKDataSet.NR.dataWydania(Tytul, nr); 120 } 121 112 122 nRDataGridView.CellValueChanged += nRDataGridView_CellValueChanged; 113 123 nRDataGridView.CellContentClick += nRDataGridView_CellContentClicked; 124 125 nRBindingSource.ResetBindings(false); 114 126 } 115 127 … … 179 191 nRDataGridView.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.White; 180 192 } 181 193 182 194 } 183 195 } … … 209 221 foreach (DataGridViewRow row in nRDataGridView.Rows) 210 222 { 211 212 223 row.DefaultCellStyle.BackColor = Color.White; 213 224 … … 223 234 (REKLAMADataSet.UKAZE_SIE_W_NRRow)table[0]; 224 235 225 226 236 if (Convert.ToDateTime(row.Cells[1].Value) < DateTime.Today) 227 237 { 228 238 row.DefaultCellStyle.BackColor = Color.MintCream; 229 239 } 230 231 if (em.zafakturowana) 232 { 240 else 241 { 242 if (em.zafakturowana) 243 { 244 row.DefaultCellStyle.BackColor = Color.LightGray; 245 } 246 247 //anulowana 248 if (em.status == 2) 249 { 250 row.DefaultCellStyle.ForeColor = Color.Red; 251 } 252 253 if (emisjaDoZmiany == (short)row.Cells[0].Value) 254 { 255 row.DefaultCellStyle.BackColor = Color.MistyRose; 256 } 257 } 258 } 259 else if (emisjaDoZmiany == 0) 260 { 261 //emisja nie zosta³a wczeniej wybrana, ale jej misi¹c ju¿ 262 // jest zafakturowany 263 DateTime dataWydania = (DateTime)row.Cells[1].Value; 264 if (dataWydania.Year <= dataOstatatniejZafakturowanejEmisji.Year 265 && 266 dataWydania.Month <= dataOstatatniejZafakturowanejEmisji.Month) 267 { 268 row.ReadOnly = true; 233 269 row.DefaultCellStyle.BackColor = Color.LightGray; 234 270 } 235 236 //anulowana 237 if (em.status == 2) 238 { 239 row.DefaultCellStyle.ForeColor = Color.Red; 240 } 241 242 if (emisjaDoZmiany == (short)row.Cells[0].Value) 243 { 244 row.DefaultCellStyle.BackColor = Color.MistyRose; 245 } 246 } 247 } 248 } 249 } 250 271 } 272 } 273 } 274 } 251 275 } 252 276 }
