private void button_save_Click(object sender, RoutedEventArgs e) { try { defaultSelect.Value = radioButton_name.IsChecked == true ? "0" : "1"; codeGenerateBy.Value = radioButton_first.IsChecked == true ? "f" : "l"; CommonMethods.setCDMDForUpdate(defaultSelect); CommonMethods.setCDMDForUpdate(codeGenerateBy); preferenceManagerImpl.upd(defaultSelect); preferenceManagerImpl.upd(codeGenerateBy); ShowMessage.success(Common.Messages.Success.Success004); } catch (Exception) { } }
private void button_save_Click(object sender, RoutedEventArgs e) { try { buyingStock.Value = comboBox_defaultBuyingStock.SelectedValue.ToString(); sellingStock.Value = comboBox_defaultSellingStock.SelectedValue.ToString(); companyReturnStock.Value = comboBox_defaultCompanyReturnStock.SelectedValue.ToString(); CommonMethods.setCDMDForUpdate(buyingStock); CommonMethods.setCDMDForUpdate(sellingStock); CommonMethods.setCDMDForUpdate(companyReturnStock); preferenceManagerImpl.upd(buyingStock); preferenceManagerImpl.upd(sellingStock); preferenceManagerImpl.upd(companyReturnStock); ShowMessage.success(Common.Messages.Success.Success004); } catch (Exception) { } }
private void button_save_Click(object sender, RoutedEventArgs e) { try { if ((preferenceIsActive.Value == "1" && checkBox_isActive.IsChecked == false) || (preferenceIsActive.Value == "0" && checkBox_isActive.IsChecked == true)) { preferenceIsActive.Value = checkBox_isActive.IsChecked == true ? "1" : "0"; CommonMethods.setCDMDForUpdate(preferenceIsActive); preferenceManagerImpl.upd(preferenceIsActive); } if (preferenceTime.Value != textBox_time.Text) { preferenceTime.Value = textBox_time.IntValue.ToString(); CommonMethods.setCDMDForUpdate(preferenceTime); preferenceManagerImpl.upd(preferenceTime); } ShowMessage.success(Common.Messages.Success.Success004); } catch (Exception) { } }
private void button_save_Click(object sender, RoutedEventArgs e) { try { preference.Value = textBox_location.Text; CommonMethods.setCDMDForUpdate(preference); preferenceManagerImpl.upd(preference); ShowMessage.success(Common.Messages.Success.Success004); } catch (Exception) { } }
private void button_save_Click(object sender, RoutedEventArgs e) { try { if (isChanged("sellingInvoicePrint_displayLineDiscount", (radioButton_percentage.IsChecked == true ? "p" : "a"))) { dic["sellingInvoicePrint_displayLineDiscount"].Value = radioButton_percentage.IsChecked == true ? "p" : "a"; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_displayLineDiscount"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_displayLineDiscount"]); } if (isChanged("sellingInvoicePrint_showDiscountOrOurPrice", (radioButton_ourPrice_showingLineDiscount.IsChecked == true ? "o" : "d"))) { dic["sellingInvoicePrint_showDiscountOrOurPrice"].Value = radioButton_ourPrice_showingLineDiscount.IsChecked == true ? "o" : "d"; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_showDiscountOrOurPrice"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_showDiscountOrOurPrice"]); } if (isChanged("sellingInvoicePrint_numberOfCopiesOfCreditBill", textBox_numberOfCopies.Text)) { dic["sellingInvoicePrint_numberOfCopiesOfCreditBill"].Value = textBox_numberOfCopies.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_numberOfCopiesOfCreditBill"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_numberOfCopiesOfCreditBill"]); } if (isChanged("sellingInvoicePrint_thankyouText", textBox_message_thankYouText.Text)) { dic["sellingInvoicePrint_thankyouText"].Value = textBox_message_thankYouText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_thankyouText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_thankyouText"]); } if (isChanged("sellingInvoicePrint_message", textBox_message_footerMessage.Text)) { dic["sellingInvoicePrint_message"].Value = textBox_message_footerMessage.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_message"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_message"]); } if (isChanged("sellingInvoicePrint_language", (radioButton_default_language.IsChecked == true ? "d" : "c"))) { dic["sellingInvoicePrint_language"].Value = radioButton_default_language.IsChecked == true ? "d" : "c"; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_language"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_language"]); } /// if (isChanged("sellingInvoicePrint_invoiceNumber_customLanguageText", textBox_invoiceNumber_customLanguageText.Text)) { dic["sellingInvoicePrint_invoiceNumber_customLanguageText"].Value = textBox_invoiceNumber_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_invoiceNumber_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_invoiceNumber_customLanguageText"]); } if (isChanged("sellingInvoicePrint_creditInvoice_customLanguageText", textBox_creditInvoice_customLanguageText.Text)) { dic["sellingInvoicePrint_creditInvoice_customLanguageText"].Value = textBox_creditInvoice_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_creditInvoice_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_creditInvoice_customLanguageText"]); } if (isChanged("sellingInvoicePrint_printedPrice_customLanguageText", textBox_printedPrice_customLanguageText.Text)) { dic["sellingInvoicePrint_printedPrice_customLanguageText"].Value = textBox_printedPrice_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_printedPrice_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_printedPrice_customLanguageText"]); } if (isChanged("sellingInvoicePrint_ourPrice_customLanguageText", textBox_ourPrice_customLanguageText.Text)) { dic["sellingInvoicePrint_ourPrice_customLanguageText"].Value = textBox_ourPrice_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_ourPrice_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_ourPrice_customLanguageText"]); } if (isChanged("sellingInvoicePrint_discount_customLanguageText", textBox_discount_customLanguageText.Text)) { dic["sellingInvoicePrint_discount_customLanguageText"].Value = textBox_discount_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_discount_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_discount_customLanguageText"]); } if (isChanged("sellingInvoicePrint_quantity_customLanguageText", textBox_quantity_customLanguageText.Text)) { dic["sellingInvoicePrint_quantity_customLanguageText"].Value = textBox_quantity_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_quantity_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_quantity_customLanguageText"]); } if (isChanged("sellingInvoicePrint_lineTotal_customLanguageText", textBox_lineTotal_customLanguageText.Text)) { dic["sellingInvoicePrint_lineTotal_customLanguageText"].Value = textBox_lineTotal_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_lineTotal_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_lineTotal_customLanguageText"]); } if (isChanged("sellingInvoicePrint_subTotal_customLanguageText", textBox_subTotal_customLanguageText.Text)) { dic["sellingInvoicePrint_subTotal_customLanguageText"].Value = textBox_subTotal_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_subTotal_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_subTotal_customLanguageText"]); } if (isChanged("sellingInvoicePrint_billDiscount_customLanguageText", textBox_billDiscount_customLanguageText.Text)) { dic["sellingInvoicePrint_billDiscount_customLanguageText"].Value = textBox_billDiscount_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_billDiscount_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_billDiscount_customLanguageText"]); } if (isChanged("sellingInvoicePrint_totalReturn_customLanguageText", textBox_totalReturn_customLanguageText.Text)) { dic["sellingInvoicePrint_totalReturn_customLanguageText"].Value = textBox_totalReturn_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_totalReturn_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_totalReturn_customLanguageText"]); } if (isChanged("sellingInvoicePrint_netTotal_customLanguageText", textBox_netTotal_customLanguageText.Text)) { dic["sellingInvoicePrint_netTotal_customLanguageText"].Value = textBox_netTotal_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_netTotal_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_netTotal_customLanguageText"]); } if (isChanged("sellingInvoicePrint_givenMoney_customLanguageText", textBox_moneyGiven_customLanguageText.Text)) { dic["sellingInvoicePrint_givenMoney_customLanguageText"].Value = textBox_moneyGiven_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_givenMoney_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_givenMoney_customLanguageText"]); } if (isChanged("sellingInvoicePrint_balance_customLanguageText", textBox_balance_customLanguageText.Text)) { dic["sellingInvoicePrint_balance_customLanguageText"].Value = textBox_balance_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_balance_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_balance_customLanguageText"]); } if (isChanged("sellingInvoicePrint_totalDiscount_customLanguageText", textBox_totalDiscount_customLanguageText.Text)) { dic["sellingInvoicePrint_totalDiscount_customLanguageText"].Value = textBox_totalDiscount_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_totalDiscount_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_totalDiscount_customLanguageText"]); } if (isChanged("sellingInvoicePrint_userName_customLanguageText", textBox_userName_customLanguageText.Text)) { dic["sellingInvoicePrint_userName_customLanguageText"].Value = textBox_userName_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_userName_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_userName_customLanguageText"]); } if (isChanged("sellingInvoicePrint_customerName_customLanguageText", textBox_customerName_customLanguageText.Text)) { dic["sellingInvoicePrint_customerName_customLanguageText"].Value = textBox_customerName_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_customerName_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_customerName_customLanguageText"]); } if (isChanged("sellingInvoicePrint_totalPayment_customLanguageText", textBox_totalPayment_customLanguageText.Text)) { dic["sellingInvoicePrint_totalPayment_customLanguageText"].Value = textBox_totalPayment_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_totalPayment_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_totalPayment_customLanguageText"]); } if (isChanged("sellingInvoicePrint_numberOfItems_customLanguageText", textBox_numberOfItems_customLanguageText.Text)) { dic["sellingInvoicePrint_numberOfItems_customLanguageText"].Value = textBox_numberOfItems_customLanguageText.Text; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrint_numberOfItems_customLanguageText"]); preferenceManagerImpl.upd(dic["sellingInvoicePrint_numberOfItems_customLanguageText"]); } if (isChanged("sellingInvoicePrinterSize", (radioButton_printerSize_POS.IsChecked == true ? "POS" : "A4"))) { dic["sellingInvoicePrinterSize"].Value = radioButton_printerSize_POS.IsChecked == true ? "POS" : "A4"; CommonMethods.setCDMDForUpdate(dic["sellingInvoicePrinterSize"]); preferenceManagerImpl.upd(dic["sellingInvoicePrinterSize"]); } ShowMessage.success(Common.Messages.Success.Success004); } catch (Exception) { } }