private void btStatSearchGoodInSupply_Click(object sender, EventArgs e) // Ищем заданный товар в поставке { string ean = tbEAN_SearchGoodInSupply.Text.Trim(); if (ean == "") { setStatusText("Задайте условие (EAN)"); return; } SupplyStat sp = new SupplyStat(cn); sp.setINN(tbStatINN.Text); sp.setOGRN(tbStatOGRN.Text); sp.setDateFrom(dtStatSupplyFrom.Value); sp.setDateTo(dtStatSupplyTo.Value); sp.setWithDate(cbSupplyWithDate.Checked); sp.setEAN(ean); sp.searchByEAN(); }
private void btStatSupplyCreate_Click(object sender, EventArgs e) { if (tbStatOGRN.Text.Trim() == "" && tbStatINN.Text.Trim() == "" && tbStatSupplierName.Text.Trim() == "" && !cbSupplyWithDate.Checked) { DialogResult dr = QuestionShow("Параметры не заданы и формирование займет много времени. Продолжаем???"); if (dr != DialogResult.Yes) { return; } } SupplyStat sp = new SupplyStat(cn); sp.setINN(tbStatINN.Text); sp.setOGRN(tbStatOGRN.Text); sp.setName(tbStatSupplierName.Text); sp.setDateFrom(dtStatSupplyFrom.Value); sp.setDateTo(dtStatSupplyTo.Value); sp.setWithDate(cbSupplyWithDate.Checked); result r = sp.searchSupply(); setStatusText(r); }