private void RemoveRow() { cap = new CommandAndParams("DEL_Deal"); cap.AddParam("@DealID", gridMain.Rows[gridMain.CurrentCell.RowIndex].Cells[0].Value); var result = cap.ExecuteNonQuery(); cap.CloseConnection(); cap = null; }
private void RemoveRowMain(int i) { cap = new CommandAndParams("DEL_Sales_Main"); cap.AddParam("@SalesID", gridMain.Rows[i].Cells[0].Value); var result = cap.ExecuteNonQuery(); cap.CloseConnection(); cap = null; }
private void UpdateRow() { cap = new CommandAndParams("UPD_Deal"); cap.AddParam("@ContractorID", dealInterrop.ContrID); cap.AddParam("@DealOID", dealInterrop.DealNumber); cap.AddParam("@DealDate", dealInterrop.DealDate); cap.AddParam("@DealName", dealInterrop.DealName); cap.AddParam("@DealDueDay", dealInterrop.DueDate); cap.AddParam("@DealID", Convert.ToInt32(gridMain.Rows[gridMain.CurrentCell.RowIndex].Cells[0].Value)); var result = cap.ExecuteNonQuery(); cap.CloseConnection(); cap = null; }
private void UpdateRowMain() { cap = new CommandAndParams("UPD_Sales_Main"); cap.AddParam("@SalesID", sales.SalesID); cap.AddParam("@SalesNum", sales.SalesNum); cap.AddParam("@SalesDate", sales.SalesDate); cap.AddParam("@VAT", sales.VAT); cap.AddParam("@SalesSum", sales.SalesSum); cap.AddParam("@SalesBaseSum", sales.SalesBaseSum); cap.AddParam("@SalesTrialSum", sales.SalesTrialSum); var result = cap.ExecuteNonQuery(); cap.CloseConnection(); cap = null; }