public ResponseModel SaveMasterSetting(MasterSetting model) { //model.CreatedDate = DateTime.Now; if (model.Id != Guid.NewGuid().ToString()) { DbContext.Entry(model).State = EntityState.Modified; DbContext.SaveChanges(); return(new ResponseModel { Success = true, Message = "Success" }); } else { model.Id = Guid.NewGuid().ToString(); DbContext.MasterSetting.Add(model); DbContext.SaveChanges(); return(new ResponseModel { Success = true, Message = "Success" }); } }
public JsonResult GetAllFinancialYear() { List <MasterSetting> masterSetting = new List <Models.Master.MasterSetting>(); KeystoneProject.Buisness_Logic.Master.BL_MasterSetting Bl_obj = new Buisness_Logic.Master.BL_MasterSetting(); MasterSetting AddServiceMod = new MasterSetting(); DataSet ds = Bl_obj.GetAllFinancialYear(); foreach (DataRow dr in ds.Tables[0].Rows) { masterSetting.Add( new MasterSetting { FinancialYearID = Convert.ToInt32(dr["FinancialYearID"]), FinancialYears = Convert.ToString(dr["FinancialYear"]), }); } return(new JsonResult { Data = masterSetting, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public ActionResult InsertMasterSetting(MasterSetting MS) { try { FinanceDbContext _db = new FinanceDbContext(); var result = _db.Database.ExecuteSqlCommand(@"exec UspUpdateMasterSetting @SettingID, @Duration, @EMIDuePenalty, @EMIDueAmount, @ProcessingFees, @GSTOnDisbursement, @CGST, @SGST, @ServiceCharges, @PreClosingCharges, @InterestAmount, @InterestRate", new SqlParameter("@SettingID", MS.SettingID), new SqlParameter("@Duration", MS.Duration), new SqlParameter("@EMIDuePenalty", MS.EMIDuePenalty), new SqlParameter("@EMIDueAmount", MS.EMIDueAmount), new SqlParameter("@ProcessingFees", MS.ProcessingFees), new SqlParameter("@GSTOnDisbursement", MS.GSTOnDisbursement), new SqlParameter("@CGST", MS.CGST), new SqlParameter("@SGST", MS.SGST), new SqlParameter("@ServiceCharges", MS.ServiceCharges), new SqlParameter("@PreClosingCharges", MS.PreClosingCharges), new SqlParameter("@InterestAmount", MS.InterestAmount), new SqlParameter("@InterestRate", MS.InterestRate)); return(Json(" Setting Changes Sucessfullly")); } catch (Exception ex) { string message = string.Format("<b>Message:</b> {0}<br /><br />", ex.Message); return(Json(message)); } }
public JsonResult GetDischargeSummarySetting() { KeystoneProject.Buisness_Logic.Master.BL_MasterSetting Bl_obj = new Buisness_Logic.Master.BL_MasterSetting(); MasterSetting AddServiceMod = new MasterSetting(); AddServiceMod.dsShowAllMasterSetting = Bl_obj.GetMasterSetting(); List <MasterSetting> search = new List <MasterSetting>(); foreach (DataRow dr in AddServiceMod.dsShowAllMasterSetting.Tables[3].Rows) { search.Add(new MasterSetting { PatientDischargeSettingID = dr["PatientDischargeSettingID"].ToString(), Name = dr["Name"].ToString(), PrintAs = dr["PrintAs"].ToString(), Sequence = dr["Sequence"].ToString(), }); } return(new JsonResult { Data = search, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public ActionResult MasterSetting(FormCollection form1) { Buisness_Logic.Master.BL_MasterSetting Setting = new Buisness_Logic.Master.BL_MasterSetting(); KeystoneProject.Models.Master.MasterSetting MasterSetting = new MasterSetting(); KeystoneProject.Models.Master.MasterSetting blankMasterSetting = new MasterSetting(); if (form1["IPDAdmission"] == null) { MasterSetting.IPDAdmission = Convert.ToBoolean(false); } else { MasterSetting.IPDAdmission = Convert.ToBoolean(true); } if (form1["FinalBillWithHeader"] == null) { MasterSetting.FinalBillWithHeader = Convert.ToBoolean(false); } else { MasterSetting.FinalBillWithHeader = Convert.ToBoolean(true); } if (form1["DateTimeSetting"] == null) { MasterSetting.DateTimeSetting = Convert.ToBoolean(false); } else { MasterSetting.DateTimeSetting = Convert.ToBoolean(true); } if (form1["OPDBilling"] == null) { MasterSetting.OpdBill = Convert.ToBoolean(false); } else { MasterSetting.OpdBill = Convert.ToBoolean(true); } if (form1["PatientPaymentAndDeposits"] == null) { MasterSetting.PatientPaymentAndDeposite = Convert.ToBoolean(false); } else { MasterSetting.PatientPaymentAndDeposite = Convert.ToBoolean(true); } if (form1["IPDBills"] == null) { MasterSetting.IpdBill = Convert.ToBoolean(false); } else { MasterSetting.IpdBill = Convert.ToBoolean(true); } if (form1["PatientPrescreptionNew"] == null) { MasterSetting.PatientPrescreptionNew = Convert.ToBoolean(false); } else { MasterSetting.PatientPrescreptionNew = Convert.ToBoolean(true); } if (form1["LabBills"] == null) { MasterSetting.LabBills = Convert.ToBoolean(false); } else { MasterSetting.LabBills = Convert.ToBoolean(true); } if (form1["LabReport"] == null) { MasterSetting.LabReport = Convert.ToBoolean(false); } else { MasterSetting.LabReport = Convert.ToBoolean(true); } if (form1["IPDFinalBills"] == null) { MasterSetting.IpdFinalBill = Convert.ToBoolean(false); } else { MasterSetting.IpdFinalBill = Convert.ToBoolean(true); } if (form1["ProvisionalBills"] == null) { MasterSetting.ProvisionalBill = Convert.ToBoolean(false); } else { MasterSetting.ProvisionalBill = Convert.ToBoolean(true); } if (form1["IPDDischarge"] == null) { MasterSetting.IPDDischargeSummary = Convert.ToBoolean(false); } else { MasterSetting.IPDDischargeSummary = Convert.ToBoolean(true); } if (form1["Authorized"] == null) { MasterSetting.Authorized = Convert.ToBoolean(false); } else { MasterSetting.Authorized = Convert.ToBoolean(true); } if (form1["ForAuthorization"] == null) { MasterSetting.ForAuthorization = Convert.ToBoolean(false); } else { MasterSetting.ForAuthorization = Convert.ToBoolean(true); } MasterSetting.FinancialYearID = Convert.ToInt32(form1["FinancialYear"]); MasterSetting.DoctorNameInLabReport = form1["DoctorLabReport"]; MasterSetting.DoctorNameInLabReport1 = form1["DoctorLabReport1"]; MasterSetting.LogoSize = form1["LogoSize"]; MasterSetting.LabReportFooter = form1["FooterSize"]; MasterSetting.PrintAs = form1["PrintAs"]; MasterSetting.Sequence = form1["Sequence"]; MasterSetting.PatientDischargeSettingID = form1["PatientDischargeSettingID"]; MasterSetting.Name = form1["Name"]; KeystoneProject.Buisness_Logic.Master.BL_MasterSetting BL_obj = new Buisness_Logic.Master.BL_MasterSetting(); int rows = BL_obj.GetMasterSetting().Tables[0].Rows.Count; if (rows == 0) { MasterSetting.Mode = "Add"; } else { MasterSetting.Mode = "Edit"; MasterSetting.MasterSettingID = Convert.ToInt32(form1["MasterSettingID"]); } string a = form1["txtSequence"]; bool chk = BL_obj.Save(MasterSetting); if (chk == true) { ModelState.Clear(); TempData["msg"] = "MasterSetting Updated Successfully"; Buisness_Logic.Master.BL_MasterSetting setting = new Buisness_Logic.Master.BL_MasterSetting(); blankMasterSetting.ShowAllMasterSetting = setting.GetMasterSetting(); //blankMasterSetting.dsFinancial = setting.GetAllFinancialYear(); } else { TempData["msg"] = "MasterSetting Not Save"; } return(RedirectToAction("MasterSetting", "MasterSetting")); }
public void Initialize(MasterSetting masterSetting) { this.masterSetting = masterSetting; m_spriteRenderer = GetComponent <SpriteRenderer>(); m_transform = transform; }
public void Initialize( MasterSetting masterSetting ) { this.masterSetting = masterSetting; m_spriteRenderer = GetComponent<SpriteRenderer>(); m_transform = transform; }
public IHttpActionResult Save([FromBody] MasterSetting model) { return(Ok(_MasterSettingRepository.SaveMasterSetting(model))); }