private void fab_OnClick(object sender, EventArgs e) { var wizard = new PriceMgmtWizard(); wizard.EditMode = EnumHelper.EditMode.Add; wizard.TxType = EnumHelper.PriceMgmtTxType.PMC; wizard.PMType = _ListType; wizard.ShowDialog(); }
void wizList_Closed(object sender, EventArgs e) { PriceMgmtWizard wizList = sender as PriceMgmtWizard; if (wizList.HeaderId != System.Guid.Empty) { BindList(); this.Update(); } }
/// <summary> /// Saves the new message handler. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void SaveNewMessageHandler(object sender, EventArgs e) { if (((Form)sender).DialogResult == DialogResult.Yes) { if (Save()) { Helper.DesktopHelper.RefreshMainList <DiscountReasonList>(); this.Close(); PriceMgmtWizard wizard = new PriceMgmtWizard(); wizard.PMType = this.PMType; wizard.ShowDialog(); } } }
private void ShowItem() { if (lvList.SelectedItem != null) { Guid id = Guid.Empty; if (Guid.TryParse(lvList.SelectedItem.SubItems[2].Text, out id)) { PriceMgmtWizard wizList = new PriceMgmtWizard(); wizList.EditMode = EnumHelper.EditMode.Edit; wizList.HeaderId = id; wizList.TxType = EnumHelper.PriceMgmtTxType.PMC; wizList.PMType = _ListType; wizList.Closed += new EventHandler(wizList_Closed); wizList.ShowDialog(); } } }
void cmdMenuClick(object sender, MenuItemEventArgs e) { //Control[] controls = this.Form.Controls.Find("wspPane", true); //if (controls.Length > 0) //{ // Panel wspPane = (Panel)controls[0]; // wspPane.Text = (string)e.MenuItem.Text; //} if (!(e.MenuItem.Tag == null)) { switch (e.MenuItem.Tag.ToString().ToLower()) { case "pricechange_worksheet": PriceMgmtWizard wizPriceChange = new PriceMgmtWizard(); wizPriceChange.EditMode = EnumHelper.EditMode.Add; wizPriceChange.TxType = EnumHelper.PriceMgmtTxType.PMC; wizPriceChange.PMType = EnumHelper.PriceMgmtPMType.Price; wizPriceChange.ShowDialog(); break; case "pricechange_authorization": Authorization wizAuthPrice = new Authorization(); wizAuthPrice.ListType = EnumHelper.PriceMgmtPMType.Price; wizAuthPrice.ShowDialog(); break; case "discchange_worksheet": PriceMgmtWizard wizDiscChange = new PriceMgmtWizard(); wizDiscChange.EditMode = EnumHelper.EditMode.Add; wizDiscChange.TxType = EnumHelper.PriceMgmtTxType.PMC; wizDiscChange.PMType = EnumHelper.PriceMgmtPMType.Discount; wizDiscChange.ShowDialog(); break; case "discchange_authorization": Authorization wizAuthDisc = new Authorization(); wizAuthDisc.ListType = EnumHelper.PriceMgmtPMType.Discount; wizAuthDisc.ShowDialog(); break; case "reason_code": ReasonCodeWizard wizReasonCode = new ReasonCodeWizard(); wizReasonCode.EditMode = EnumHelper.EditMode.Add; wizReasonCode.ShowDialog(); break; case "rpt_pricechangeworksheet": Reports.Worksheet wizPriceWorksheet = new RT2020.PriceMgmt.Reports.Worksheet(); wizPriceWorksheet.ReportType = EnumHelper.PriceMgmtPMType.Price; wizPriceWorksheet.ShowDialog(); break; case "rpt_pricechangehistory": Reports.History wizPriceHistory = new RT2020.PriceMgmt.Reports.History(); wizPriceHistory.ReportType = EnumHelper.PriceMgmtPMType.Price; wizPriceHistory.ShowDialog(); break; case "rpt_discountchangeworksheet": Reports.Worksheet wizDiscWorksheet = new RT2020.PriceMgmt.Reports.Worksheet(); wizDiscWorksheet.ReportType = EnumHelper.PriceMgmtPMType.Discount; wizDiscWorksheet.ShowDialog(); break; case "rpt_discountchangehistory": Reports.History wizDiscHistory = new RT2020.PriceMgmt.Reports.History(); wizDiscHistory.ReportType = EnumHelper.PriceMgmtPMType.Discount; wizDiscHistory.ShowDialog(); break; } } }