private void findButton_Click(object sender, EventArgs e) { dataGridViewRaw.Rows.Clear(); FilterUtils.FilterFormatter filterFormatter = new FilterUtils.FilterFormatter(); filterFormatter.addValueWithRegisters("name_raw", rawTextBox.Text); string command = filterFormatter.getFormattedRequestForFindRaw(); DAO.getInstance().findRaw(command, dataGridViewRaw); dataGridViewRaw.ClearSelection(); }
private void findButton_Click(object sender, EventArgs e) { dataGridViewDelivery.Rows.Clear(); FilterUtils.FilterFormatter filterFormatter = new FilterUtils.FilterFormatter(); filterFormatter.addValue("year_crop", yearTextBox.Text); filterFormatter.addValueWithRegisters("name_raw", rawTextBox.Text); filterFormatter.addValueWithRegisters("name_contr", contractorTextBox.Text); string command = ""; if (this.Text == "Поставка") { string[] columns = { Delivery.DateAttr, Delivery.TransportAttr, Delivery.WeightAttr }; command = filterFormatter.getFormattedRequestForTransportation(Delivery.NameTable, columns); } else { string[] columns = { Shipment.DateAttr, Shipment.TransportAttr, Shipment.WeightAttr }; command = filterFormatter.getFormattedRequestForTransportation(Shipment.NameTable, columns); } DAO.getInstance().findTransportation(command, dataGridViewDelivery); dataGridViewDelivery.ClearSelection(); }