Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void ladowanie_listy_paczek()
- {
- Cursor.Current = Cursors.WaitCursor;
- try
- {
- this.flaga_zmiany = false;
- this.comboBox1.DataSource = (object) null;
- this.comboBox1.Items.Clear();
- string[][] strArray1 = new string[1][];
- string[][] strArray2 = new string[1][];
- int int32 = Convert.ToInt32(this.sqlzap("select count(cdn.wyspaczki.wyp_idpaczki) from cdn.wyspaczki where wyp_datautw <= datediff(day,convert(datetime,'1800-12-28',120),convert(datetime,'" + (object) this.dateTimePicker_to.Value + "',120)) and wyp_datautw >=datediff(day,convert(datetime,'1800-12-28',120),convert(datetime,'" + (object) this.dateTimePicker_from.Value + "',120))", this.stringpolaczenie)[0][0]);
- string[][] strArray3 = this.sqlzap("select cdn.wyspaczki.wyp_idpaczki as idpaczki, CDN.NumerDokumentuTRN(340,0,0, cdn.WysPaczki.WyP_Numer, cdn.WysPaczki.WyP_Rok , cdn.WysPaczki.WyP_Seria) as numerpelny, cdn.wyspaczki.wyp_datautw from cdn.wyspaczki where wyp_datautw <= datediff(day,convert(datetime,'1800-12-28',120),convert(datetime,'" + (object) this.dateTimePicker_to.Value + "',120)) and wyp_datautw >=datediff(day,convert(datetime,'1800-12-28',120),convert(datetime,'" + (object) this.dateTimePicker_from.Value + "',120))", this.stringpolaczenie);
- if (this.lista_paczek.Count > 0)
- this.lista_paczek.Clear();
- if (int32 > 0)
- {
- for (int index = 0; index < int32; ++index)
- this.lista_paczek.Add(new paczka(strArray3[index][0], strArray3[index][1]));
- this.comboBox1.DataSource = (object) this.lista_paczek;
- this.comboBox1.DisplayMember = "Wartosc";
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.ToString());
- MessageBox.Show(this.dateTimePicker_to.Value.ToString());
- }
- Cursor.Current = Cursors.Default;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement