private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { string tag = (string)e.Item.Tag; switch (tag) { case "ToXS": // Operations.Open("invoices.xs.edit1", this.MdiParent, this.bindingSource1.Current); Invoices.XS.EditForm f = new Book.UI.Invoices.XS.EditForm(this.bindingSource1.Current as Model.InvoiceXO); if (this.bindingSource1.Current != null) { f.ShowDialog(this); } break; } }
private void repositoryItemHyperLinkEdit1_Click(object sender, EventArgs e) { Model.StockSeach m = this.bindingSource1.Current as Model.StockSeach; if (m != null) { if (m.InvoiceType == "出倉單") { Settings.StockLimitations.OutStockEditForm f = new Book.UI.Settings.StockLimitations.OutStockEditForm(m.InvoiceNO); f.ShowDialog(this); } else if (m.InvoiceType == "入倉單") { Settings.StockLimitations.DepotInForm f = new Book.UI.Settings.StockLimitations.DepotInForm(m.InvoiceNO); f.ShowDialog(this); } else if (m.InvoiceType == "盤點核准單") { Settings.StockLimitations.StockCheckForm f = new Book.UI.Settings.StockLimitations.StockCheckForm(m.InvoiceNO); f.ShowDialog(this); } else if (m.InvoiceType == "庫存調撥單") { Invoices.PT.EditForm f = new Book.UI.Invoices.PT.EditForm(m.InvoiceNO); f.ShowDialog(this); } else if (m.InvoiceType == "生產入庫單") { produceManager.ProduceInDepot.EditForm f = new Book.UI.produceManager.ProduceInDepot.EditForm(m.InvoiceNO); f.ShowDialog(this); } else if (m.InvoiceType == "委外入庫單") { produceManager.ProduceOtherInDepot.Editform f = new Book.UI.produceManager.ProduceOtherInDepot.Editform(m.InvoiceNO, "view"); f.ShowDialog(this); } else if (m.InvoiceType == "銷售出貨單") { Invoices.XS.EditForm f = new Book.UI.Invoices.XS.EditForm(m.InvoiceNO); f.ShowDialog(this); } else if (m.InvoiceType == "採購入庫單") { Invoices.CG.EditForm f = new Book.UI.Invoices.CG.EditForm(m.InvoiceNO); f.ShowDialog(this); } else if (m.InvoiceType == "銷售退貨") { Invoices.XT.EditForm f = new Book.UI.Invoices.XT.EditForm(m.InvoiceNO); f.ShowDialog(this); } else if (m.InvoiceType == "採購退貨") { Invoices.CT.EditForm f = new Book.UI.Invoices.CT.EditForm(m.InvoiceNO, "view"); f.ShowDialog(this); } else if (m.InvoiceType == "生产退料") { produceManager.ProduceMaterialExit.EditForm f = new Book.UI.produceManager.ProduceMaterialExit.EditForm(m.InvoiceNO); f.ShowDialog(this); } } }