public Sales_Order(SalesOrderController my_controller, String id, int type) { InitializeComponent(); setup(id, "FAFOS Sales Order Form"); //this.btnCancel.Click += new System.EventHandler(my_controller.cancelSalesOrder); this.dgvSalesOrder.CellEndEdit += new DataGridViewCellEventHandler(my_controller.dgvSalesOrder_CellValueChanged); this.dgvSalesOrder.CellValueChanged += new DataGridViewCellEventHandler(my_controller.dgvSalesOrder_CellValueChanged); this.btnPreview.Click += new System.EventHandler(my_controller.preview); if (type == 2) { setupQuoteForm(); this.btnPullData.Click += new System.EventHandler(my_controller.pullQuoteData); this.btnSubmit.Click += new System.EventHandler(my_controller.createSalesOrder); } else if (type == 3) { setupEditSalesOrderForm(); this.dgvSalesOrder.UserDeletedRow += new DataGridViewRowEventHandler(my_controller.DataGridView1_UserDeletedRow); this.btnPullData.Click += new System.EventHandler(my_controller.pullSalesOrder); this.btnSubmit.Click += new System.EventHandler(my_controller.saveSalesOrder); } else this.btnSubmit.Click += new System.EventHandler(my_controller.createSalesOrder); }
public Sales_Order(SalesOrderController my_controller, String id, int type) { InitializeComponent(); setup(id, "FAFOS Sales Order Form"); //this.btnCancel.Click += new System.EventHandler(my_controller.cancelSalesOrder); this.dgvSalesOrder.CellEndEdit += new DataGridViewCellEventHandler(my_controller.dgvSalesOrder_CellValueChanged); this.dgvSalesOrder.CellValueChanged += new DataGridViewCellEventHandler(my_controller.dgvSalesOrder_CellValueChanged); this.btnPreview.Click += new System.EventHandler(my_controller.preview); if (type == 2) { setupQuoteForm(); this.btnPullData.Click += new System.EventHandler(my_controller.pullQuoteData); this.btnSubmit.Click += new System.EventHandler(my_controller.createSalesOrder); } else if (type == 3) { setupEditSalesOrderForm(); this.dgvSalesOrder.UserDeletedRow += new DataGridViewRowEventHandler(my_controller.DataGridView1_UserDeletedRow); this.btnPullData.Click += new System.EventHandler(my_controller.pullSalesOrder); this.btnSubmit.Click += new System.EventHandler(my_controller.saveSalesOrder); } else { this.btnSubmit.Click += new System.EventHandler(my_controller.createSalesOrder); } }
private void btnEditSO_Click(object sender, EventArgs e) { SalesOrderController my_controller = new SalesOrderController(userid.ToString()); my_controller.salesOrder(3, pnlPage); }