public void LoadProffixCalculation(GeneralSettingModel generalSettingModel, PriceCalculationSetting moduleSetting, string[] arguments) { //ProffixResult oResult = new ProffixResult(arguments); //if (arguments != null) //{ // if (arguments.Length == 2) // { // if (arguments[1].TrimStart().TrimEnd().Trim().StartsWith("opencal")) // { // //new or load // string[] sSubParam = arguments[1].Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); // if (sSubParam.Length == 2) // { // //new // NewCalculation(generalSettingModel, moduleSetting, sSubParam[1]); // } // else if (sSubParam.Length > 2) // { // //load // } // } // } //} }
void ReloadPriceCalculationSetting(bool refresh) { //load module settings if (refresh) { _PriceCalculationSetting = ApplicationOperator.GetPriceCalculationSetting(); } }
public void LoadCalculation(CalculationModel model, PriceCalculationSetting moduleSetting) { model.ProffixConnection = moduleSetting.ProffixConnection; _Model = model; //setup everythings SetUpCalculation(); }
public static PriceCalculationSetting GetPriceCalculationSetting() { PriceCalculationSetting priceCalculationSetting = null; GetDeserialize <PriceCalculationSetting>(priceCalculationSettingPath, ref priceCalculationSetting); if (priceCalculationSetting == null) { return(new PriceCalculationSetting()); } return(priceCalculationSetting); }
public void NewCalculation(GeneralSettingModel generalSettingModel, PriceCalculationSetting moduleSetting) { _Model = new CalculationModel() { //set new id is zero ID = 0, GeneralSetting = generalSettingModel, ProffixConnection = moduleSetting.ProffixConnection, CalculationNotes = new List <CalculationNoteModel>(), CalculationViewItems = new List <CalculationItemModel>(), ProffixModel = generalSettingModel.ProffixModel }; //setup new calculation _Model.SetBasicCalculationNote(); _Model.SetScaleCalculationNote(moduleSetting.PriceSetting, _Model.CalculationNotes.First().CalculationItems.Last().ItemOrder); _Model.SetMarginCalculationNote(); //setup everythings SetUpCalculation(); }
public static void SavePriceCalculationSetting(PriceCalculationSetting priceCalculationSettin) { SeSerialize <PriceCalculationSetting>(priceCalculationSettingPath, priceCalculationSettin); }
public SettingCtrl() { InitializeComponent(); _Setting = ApplicationOperator.GetPriceCalculationSetting(); }