public ActionResult StepFithteenSelectNodesEdit(t_ListOfQuestions model, bool isBack = false) { if (isBack) { InitDropDownsListForAllTypesPage(); return PartialView("StepFourteenSelectNodesPartial", UserContext.ListOfQuestion); } if (string.IsNullOrEmpty(model.Chimney)) { ModelState.AddModelError("Summary", "Не все поля заполнены"); return PartialView("StepFithteenSelectNodesPartial", UserContext.ListOfQuestion); } if (model.Chimney == "Нужна") { if (string.IsNullOrEmpty(model.ChimneyHeight)) { ModelState.AddModelError("Summary", "Не заполнено обязательное поле Высота трубы"); return PartialView("StepFithteenSelectNodesPartial", UserContext.ListOfQuestion); } } SetPropertyListQuestion(l => { l.Chimney = model.Chimney; l.ChimneyHeight = model.ChimneyHeight; }); return PartialView("StepSixteenSelectNodesPartial", UserContext.ListOfQuestion); }
public ActionResult StepSixteenSelectNodesEdit(t_ListOfQuestions model, bool isBack = false) { if (isBack) { InitDropDownsListForAllTypesPage(); return PartialView("StepFithteenSelectNodesPartial", UserContext.ListOfQuestion); } if (string.IsNullOrEmpty(model.ClientName) || string.IsNullOrEmpty(model.ClientEmail) || string.IsNullOrEmpty(model.ClientPhone)) { ModelState.AddModelError("Summary", "Не все поля заполнены"); return PartialView("StepSixteenSelectNodesPartial", UserContext.ListOfQuestion); } var listQuestion = UserContext.ListOfQuestion; SetPropertyListQuestion(l => { l.ClientName = model.ClientName; l.ClientEmail = model.ClientEmail; l.ClientOrganization = model.ClientOrganization; l.ClientPhone = model.ClientPhone; }); listQuestion.CreateDate = DateTime.Now; try { db.ListOfQuestionsRepository.Insert(listQuestion); db.Save(); var email = new EmailController(); SendEmailToManager(listQuestion.Id); } catch (Exception ex) { Logger.Instance.Error(string.Format("Error save ListQuestion ", ex.Message)); throw ex; } return PartialView("StepFinishPartial", UserContext.ListOfQuestion); }
public ActionResult StepThirthteenSelectForAllTypesEdit(t_ListOfQuestions model, bool isBack = false) { if (isBack) { return PartialView("StepTwelveSelectParamsHeatTransferParial", UserContext.ListOfQuestion); } if (model.WaterConditioningSystem == "Не выбран" || model.WaterBag == "Не выбран" || model.MakeUpNode == "Не выбран") { ModelState.AddModelError("Summary", "Не все поля заполнены"); return PartialView("StepThirthteenSelectForAllTypesPartial", UserContext.ListOfQuestion); } SetPropertyListQuestion(l => { l.WaterConditioningSystem = model.WaterConditioningSystem; l.WaterBag = model.WaterBag; l.MakeUpNode = model.MakeUpNode; }); InitDropDownsListForNodesPage(); return PartialView("StepFourteenSelectNodesPartial", UserContext.ListOfQuestion); }
public ActionResult StepFourteenSelectNodesEdit(t_ListOfQuestions model, bool isBack = false) { if (isBack) { InitDropDownsListForAllTypesPage(); return PartialView("StepThirthteenSelectForAllTypesPartial", UserContext.ListOfQuestion); } if (model.AccountingNodesMainFuel == "Не выбран" || model.AccountingNodesBackingCrashFuel == "Не выбран" || model.AccountingNodesHeat == "Не выбран" || model.AccountingNodesElectroPower == "Не выбран" || model.AccountingNodesWater == "Не выбран") { ModelState.AddModelError("Summary", "Не все поля заполнены"); return PartialView("StepFourteenSelectNodesPartial", UserContext.ListOfQuestion); } SetPropertyListQuestion(l => { l.AccountingNodesMainFuel = model.AccountingNodesMainFuel; l.AccountingNodesBackingCrashFuel = model.AccountingNodesBackingCrashFuel; l.AccountingNodesHeat = model.AccountingNodesHeat; l.AccountingNodesElectroPower = model.AccountingNodesElectroPower; l.AccountingNodesWater = model.AccountingNodesWater; }); return PartialView("StepFithteenSelectNodesPartial", UserContext.ListOfQuestion); }
public ActionResult StepElevenSelectTechPopertyBoilerEdit(t_ListOfQuestions model, bool isBack = false) { if (isBack) { return PartialView("StepTenSelectTechPopertyParial", UserContext.ListOfQuestion); } if (string.IsNullOrEmpty(model.PowerBoiler) || string.IsNullOrEmpty(model.PowerGVS) || string.IsNullOrEmpty(model.PowerAir) || string.IsNullOrEmpty(model.Categorization)) { ModelState.AddModelError("Summary", "Не все поля заполнены"); return PartialView("StepElevenSelectTechPopertyBoilerParial", UserContext.ListOfQuestion); } SetPropertyListQuestion(l => { l.PowerBoiler = model.PowerBoiler; l.PowerGVS = model.PowerGVS; l.PowerAir = model.PowerAir; l.Categorization = model.Categorization; }); InitSourceDropDownsListForParamsHeatTransferPage(); return PartialView("StepTwelveSelectParamsHeatTransferParial", UserContext.ListOfQuestion); }
public ActionResult StepTwelveSelectParamsHeatTransferEdit(t_ListOfQuestions model, bool isBack = false) { if (isBack) { return PartialView("StepElevenSelectTechPopertyBoilerParial", UserContext.ListOfQuestion); } if (model.TypeHeatTransfer == "Не выбран" || model.Temperature == "Не выбран" || model.MaxPressure == "Не выбран" || model.ChangePressure == "Не выбран") { ModelState.AddModelError("Summary", "Не все поля заполнены"); return PartialView("StepTwelveSelectParamsHeatTransferParial", UserContext.ListOfQuestion); } SetPropertyListQuestion(l => { l.TypeHeatTransfer = model.TypeHeatTransfer; l.Temperature = model.Temperature; l.MaxPressure = model.MaxPressure; l.ChangePressure = model.ChangePressure; }); InitDropDownsListForAllTypesPage(); return PartialView("StepThirthteenSelectForAllTypesPartial", UserContext.ListOfQuestion); }
public ActionResult StepEightTypeFuelEdit(t_ListOfQuestions model, bool isBack = false) { if (isBack) { return PartialView("StepSeventhSelectUploadPlanParial", UserContext.ListOfQuestion); } if (model.TypeFuelMain == "Не выбран" || model.TypeFuelBacking == "Не выбран" || model.TypeFuelCrash == "Не выбран") { ModelState.AddModelError("Summary", "Не все поля заполнены"); return PartialView("StepEightKindFuelPartial", UserContext.ListOfQuestion); } SetPropertyListQuestion(l => { l.TypeFuelMain = model.TypeFuelMain; l.TypeFuelBacking = model.TypeFuelBacking; l.TypeFuelCrash = model.TypeFuelCrash; }); return PartialView("StepTenSelectTechPopertyParial", UserContext.ListOfQuestion); }
public ActionResult StepTenSelectTechPopertyEdit(t_ListOfQuestions model, bool isBack = false) { if (isBack) { InitSessionModel(); return PartialView("StepEightKindFuelPartial", UserContext.ListOfQuestion); } if (model.IsFileFuelMain) { if (UserContext.ListOfQuestion.FuelMainFile == null) { ModelState.AddModelError("Summary", "Необходимо выбрать файл для загрузки"); return PartialView("StepTenSelectTechPopertyParial", UserContext.ListOfQuestion); } } if (model.IsFileFuelBacking) { if (UserContext.ListOfQuestion.FuelBackingFile == null) { ModelState.AddModelError("Summary", "Необходимо выбрать файл для загрузки"); return PartialView("StepTenSelectTechPopertyParial", UserContext.ListOfQuestion); } } if (model.IsFileFuelCrash) { if (UserContext.ListOfQuestion.FuelCrashFile == null) { ModelState.AddModelError("Summary", "Необходимо выбрать файл для загрузки"); return PartialView("StepTenSelectTechPopertyParial", UserContext.ListOfQuestion); } } if (model.ProperyFuelGasMain == "Не выбран" || model.ProperyFuelGasBacking == "Не выбран" || model.ProperyFuelGasCrash == "Не выбран") { ModelState.AddModelError("Summary", "Не все поля заполнены"); return PartialView("StepTenSelectTechPopertyParial", UserContext.ListOfQuestion); } SetPropertyListQuestion(l => { l.ProperyFuelGasMain = model.ProperyFuelGasMain; l.ProperyFuelGasBacking = model.ProperyFuelGasBacking; l.ProperyFuelGasCrash = model.ProperyFuelGasCrash; }); return PartialView("StepElevenSelectTechPopertyBoilerParial", UserContext.ListOfQuestion); }
public ActionResult StepSixSelectTypeExecuteEdit(t_ListOfQuestions model, bool isBack = false) { if (isBack) { return PartialView("StepFifthSelectLocationPartial", UserContext.ListOfQuestion); } if (string.IsNullOrEmpty(model.TypeBoilerExecute)) { ModelState.AddModelError("Summary", "Необходимо выбрать одно из предложенных"); return PartialView("StepSixSelectTypeExecuteParial"); } SetPropertyListQuestion(l => l.TypeBoilerExecute = model.TypeBoilerExecute); var listQuestion = UserContext.ListOfQuestion; if (listQuestion.TypeLocation == "Крышная котельная" && model.TypeBoilerExecute == "Блочно-модульная") { return PartialView("StepElevenSelectTechPopertyBoilerParial", listQuestion); } if (listQuestion.TypeBoilerExecute == "Блочно-модульная") { InitSessionModel(); return PartialView("StepEightKindFuelPartial", listQuestion); } return PartialView("StepSeventhSelectUploadPlanParial", listQuestion); }
public ActionResult StepFifthSelectLocationEdit(t_ListOfQuestions model, bool isBack = false) { if (isBack) { return PartialView("StepFourSelectPersonalPartial", UserContext.ListOfQuestion); } if (string.IsNullOrEmpty(model.TypeLocation)) { ModelState.AddModelError("Summary", "Необходимо выбрать одно из предложенных"); return PartialView("StepFifthSelectLocationPartial"); } if (model.TypeLocation == "Встроенная котельная") { SetPropertyListQuestion(l => l.TypeLocation = model.TypeLocation); return PartialView("StepSeventhSelectUploadPlanParial", UserContext.ListOfQuestion); } SetPropertyListQuestion(l => l.TypeLocation = model.TypeLocation); return PartialView("StepSixSelectTypeExecuteParial", UserContext.ListOfQuestion); }
public ActionResult StepFourSelectPersonalPartialEdit(t_ListOfQuestions model, bool isBack = false) { if (isBack) { return PartialView("StepThreeSelectBoilerDestinationTechPartial", UserContext.ListOfQuestion); } if (string.IsNullOrEmpty(model.HasPersonal)) { ModelState.AddModelError("Summary", "Необходимо выбрать одно из предложенных"); return PartialView("StepFourSelectPersonalPartial"); } if (model.HasPersonal == "Требуется") { return PartialView("AddictionalyQuestionListPartial"); } SetPropertyListQuestion(l => l.HasPersonal = model.HasPersonal); return PartialView("StepFifthSelectLocationPartial", UserContext.ListOfQuestion); }
public ActionResult StepTwoSelectBoilerDestinationEdit(t_ListOfQuestions model, bool isBack = false) { if (isBack) { return PartialView("StepFirstSelectBoilerByPriceClassPartial", UserContext.ListOfQuestion); } if (string.IsNullOrEmpty(model.TypeDestination)){ ModelState.AddModelError("Summary", "Необходимо выбрать одно из предложенных"); return PartialView("StepTwoSelectBoilerDestinationPartial"); } if (model.TypeDestination != "Водогрейная") { return PartialView("AddictionalyQuestionListPartial"); } SetPropertyListQuestion(l => l.TypeDestination = model.TypeDestination); return PartialView("StepThreeSelectBoilerDestinationTechPartial", UserContext.ListOfQuestion); }
public ActionResult StepFirstSelectBoilerByPriceClassEdit(t_ListOfQuestions model) { if (string.IsNullOrEmpty(model.ClassPrice)) { ModelState.AddModelError("Summary", "Необходимо выбрать одно из предложенных"); return PartialView("StepFirstSelectBoilerByPriceClassPartial"); } SetPropertyListQuestion(l => l.ClassPrice = model.ClassPrice); if (model.ClassPrice == "Мини-класс") { return PartialView("StepElevenSelectTechPopertyBoilerParial",UserContext.ListOfQuestion); } return PartialView("StepTwoSelectBoilerDestinationPartial", UserContext.ListOfQuestion); }