private void ShowEditWindow() { if (quotationType.Equals("1")) { WinAddEditQuotationItem w = new WinAddEditQuotationItem(); w.ViewData = currentViewObj; w.Caption = CLanguage.getValue("ADMIN_EDIT") + " " + CLanguage.getValue("quotation_item"); w.Mode = "E"; w.ShowDialog(); if (w.HasModified) { vw.CalculateExtraFields(); vw.IsModified = true; } } else { WinAddEditQuotationItemComplex w = new WinAddEditQuotationItemComplex(); w.ViewData = currentViewObj; w.Caption = CLanguage.getValue("ADMIN_EDIT") + " " + CLanguage.getValue("quotation_item"); w.Mode = "E"; w.ShowDialog(); if (w.HasModified) { vw.CalculateExtraFields(); vw.IsModified = true; } } }
private void cmdAddProduct_Click(object sender, RoutedEventArgs e) { if (quotationType.Equals("2")) { WinAddEditQuotationItemComplex w = new WinAddEditQuotationItemComplex(); w.Caption = (String)(sender as Button).Content + " " + CLanguage.getValue("quotation_item"); w.Mode = "A"; w.ParentView = vw; w.ShowDialog(); if (w.HasModified) { vw.CalculateExtraFields(); vw.IsModified = true; } } else { WinAddEditQuotationItem w = new WinAddEditQuotationItem(); w.Caption = (String)(sender as Button).Content + " " + CLanguage.getValue("quotation_item"); w.Mode = "A"; w.ParentView = vw; w.ShowDialog(); if (w.HasModified) { vw.CalculateExtraFields(); vw.IsModified = true; } } }