public JsonResult Fill(int UserID) { DataSet ds = new DataSet(); List <Users> Search = new List <Users>(); ds = user.GetUsers(UserID); Users addusers = new Users(); addusers.UserID = Convert.ToInt32(ds.Tables[0].Rows[0]["UserID"].ToString()); addusers.FullName = ds.Tables[0].Rows[0]["FullName"].ToString(); addusers.LoginName = ds.Tables[0].Rows[0]["LoginName"].ToString(); KeystoneProject.Buisness_Logic.Master.BL_MasterSetting obj4 = new Buisness_Logic.Master.BL_MasterSetting(); DataSet dsMasterSetting = new DataSet(); dsMasterSetting = obj4.GetMasterSetting(); if (Convert.ToBoolean(dsMasterSetting.Tables[0].Rows[0]["ForAuthorization"]) == true) { addusers.chbAuthorizationRights = ds.Tables[0].Rows[0]["AuthorizationRights"].ToString(); } else { addusers.chbAuthorizationRights = "false"; } addusers.Password = ds.Tables[0].Rows[0]["Password"].ToString(); addusers.Password2 = ds.Tables[0].Rows[0]["Password2"].ToString(); addusers.RoleID2 = ds.Tables[0].Rows[0]["RoleID2"].ToString(); addusers.EmailID = ds.Tables[0].Rows[0]["EmailID"].ToString(); addusers.RoleName = ds.Tables[0].Rows[0]["RoleName"].ToString(); addusers.UserDetailsID = Convert.ToInt32(ds.Tables[0].Rows[0]["UserDetailsID"]); if (ds.Tables[1].Rows.Count > 0) { addusers.RoleName2 = ds.Tables[1].Rows[0]["RoleName2"].ToString(); } addusers.RoleID = Convert.ToInt32(ds.Tables[0].Rows[0]["RoleID"].ToString()); addusers.Mode = "Edit"; Search.Add(addusers); return(new JsonResult { Data = Search, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public ActionResult MasterSetting(KeystoneProject.Models.Master.MasterSetting MasterSetting) { Buisness_Logic.Master.BL_MasterSetting setting = new Buisness_Logic.Master.BL_MasterSetting(); MasterSetting.ShowAllMasterSetting = setting.GetMasterSetting(); MasterSetting.dsFinancial = setting.GetAllFinancialYear(); if (MasterSetting.ShowAllMasterSetting.Tables[0].Rows.Count != 0) { MasterSetting.OPDBillsOutSidePatient = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["OPDBillsOutSidePatient"].ToString()); MasterSetting.ForAuthorization = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["ForAuthorization"].ToString()); MasterSetting.OPDLabBillsOutSidePatient = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["OPDLabBillsOutSidePatient"].ToString()); MasterSetting.MasterSettingID = Convert.ToInt32(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["MasterSettingID"].ToString()); MasterSetting.DoctorNameInLabReport = MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["DoctorNameInLabReport"].ToString(); MasterSetting.DoctorNameInLabReport1 = MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["DoctorNameInLabReport1"].ToString(); MasterSetting.LogoSize = MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["LogoSize"].ToString(); MasterSetting.LabReportFooter = MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["LabReportFooter"].ToString(); MasterSetting.OPDRegistration = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["OPDRegistration"].ToString()); MasterSetting.OpdBill = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["OpdBill"].ToString()); MasterSetting.IPDAdmission = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["IPDAdmission"].ToString()); MasterSetting.IpdBill = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["IpdBill"].ToString()); MasterSetting.ProvisionalBill = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["ProvisionalBill"].ToString()); MasterSetting.IpdFinalBill = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["IpdFinalBill"].ToString()); MasterSetting.IPDDischargeSummary = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["IPDDischargeSummary"].ToString()); MasterSetting.PatientPaymentAndDeposite = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["PatientPaymentAndDeposite"].ToString()); MasterSetting.PatientPrescription = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["PatientPrescription"].ToString()); MasterSetting.PatientPrescreptionNew = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["PatientPrescreptionNew"].ToString()); MasterSetting.LabBills = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["LabBills"].ToString()); MasterSetting.LabReport = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["LabReport"].ToString()); MasterSetting.Authorized = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["Authorized"].ToString()); MasterSetting.DateTimeSetting = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["DateTimeSetting"].ToString()); MasterSetting.FinancialYearID = Convert.ToInt32(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["FinancialYearID"].ToString()); MasterSetting.FinalBillWithHeader = Convert.ToBoolean(MasterSetting.ShowAllMasterSetting.Tables[0].Rows[0]["FinalBillWithHeader"].ToString()); } return(View(MasterSetting)); }
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 string DeletePreBalanceAmount(int PatientAccountRowID, string DeleteReason, String BillType, int RegNo, string SecurityDeposityID) { Connect(); string Result = null; try { SqlCommand cmd = new SqlCommand("DeletePreBalance", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@PatientAccountRowID", PatientAccountRowID); cmd.Parameters.AddWithValue("@DeleteReason", DeleteReason); con.Open(); Result = cmd.ExecuteNonQuery().ToString(); // con.Close(); if (BillType == "IPD SecurityDeposit PreBalanceBills") { cmd = new SqlCommand("update SecurityDepositeTPA set RowStatus=1 where PatientRegNo=" + RegNo + " and RowStatus=0 and HospitalID=" + HospitalID + " and LocationID=" + LocationID + " and BillType='IPDSecurityDeposit PreBalanceBills' and SecurityDeposityID=" + SecurityDeposityID + "", con); cmd.ExecuteNonQuery(); } con.Close(); #region ForAuthorization // int ForAuthorization = 0; // Aurthorise KeystoneProject.Buisness_Logic.Master.BL_MasterSetting obj4 = new Buisness_Logic.Master.BL_MasterSetting(); DataSet dsMasterSetting = new DataSet(); dsMasterSetting = obj4.GetMasterSetting(); KeystoneProject.Buisness_Logic.Hospital.BL_Users user = new Buisness_Logic.Hospital.BL_Users(); DataSet dsAuthorizationRights = new DataSet(); // List<Users> Search = new List<Users>(); dsAuthorizationRights = user.GetUsers(UserID); string chkAurthoriseUserWise = dsAuthorizationRights.Tables[0].Rows[0]["AuthorizationRights"].ToString(); string ForAuthorization = "0"; if (chkAurthoriseUserWise == "True") { dsMasterSetting.Tables[0].Rows[0]["ForAuthorization"] = false; ForAuthorization = "0"; } if (Convert.ToBoolean(dsMasterSetting.Tables[0].Rows[0]["ForAuthorization"]) == true) { ForAuthorization = "1"; con.Close(); SqlCommand cmdIUForAuthorization = new SqlCommand("IUForAuthorization", con); cmdIUForAuthorization.CommandType = CommandType.StoredProcedure; cmdIUForAuthorization.Parameters.AddWithValue("@HospitalID", HospitalID); cmdIUForAuthorization.Parameters.AddWithValue("@LocationID", LocationID); cmdIUForAuthorization.Parameters.AddWithValue("@PatientAccountRowID", PatientAccountRowID); cmdIUForAuthorization.Parameters.AddWithValue("@UserID", UserID); cmdIUForAuthorization.Parameters.AddWithValue("@AuthorationReason", "change"); cmdIUForAuthorization.Parameters.AddWithValue("@BillNo", 0); cmdIUForAuthorization.Parameters.AddWithValue("@BillType", BillType); cmdIUForAuthorization.Parameters.AddWithValue("@Date", DateTime.Now); cmdIUForAuthorization.Parameters.AddWithValue("@PatientRegNO", RegNo); cmdIUForAuthorization.Parameters.AddWithValue("@CreationID", UserID); cmdIUForAuthorization.Parameters.AddWithValue("@Mode", "Add"); con.Open(); cmdIUForAuthorization.ExecuteNonQuery(); } #endregion return(Result); } catch (Exception) { return(Result); } }
public ActionResult AjaxMethodDgv(string PatientRegNO) { Connect(); #region ForAuthorization int ForAuthorization = 0; // Aurthorise KeystoneProject.Buisness_Logic.Master.BL_MasterSetting obj4 = new Buisness_Logic.Master.BL_MasterSetting(); DataSet dsMasterSetting = new DataSet(); dsMasterSetting = obj4.GetMasterSetting(); KeystoneProject.Buisness_Logic.Hospital.BL_Users user = new Buisness_Logic.Hospital.BL_Users(); DataSet dsAuthorizationRights = new DataSet(); // List<Users> Search = new List<Users>(); Connect(); HospitlLocationID(); dsAuthorizationRights = user.GetUsers(CreationID); string chkAurthoriseUserWise = ""; if (dsAuthorizationRights.Tables[0].Rows.Count > 0) { chkAurthoriseUserWise = dsAuthorizationRights.Tables[0].Rows[0]["AuthorizationRights"].ToString(); } if (chkAurthoriseUserWise == "True") { chkAurthoriseUserWise = dsAuthorizationRights.Tables[0].Rows[0]["AuthorizationRights"].ToString(); if (chkAurthoriseUserWise == "True") { dsMasterSetting.Tables[0].Rows[0]["ForAuthorization"] = false; ForAuthorization = 0; } } if (Convert.ToBoolean(dsMasterSetting.Tables[0].Rows[0]["ForAuthorization"]) == true) { ForAuthorization = 1; } #endregion List <PreBalanceAmount> search = new List <PreBalanceAmount>(); DataSet ds1 = new DataSet(); DataSet ds2 = new DataSet(); DataSet ds = objblamt.GetPatientName(PatientRegNO); if (ForAuthorization == 0) { ds1 = objblamt.GetRefoundAmount(Convert.ToInt32(PatientRegNO)); } if (ForAuthorization == 1) { ds1 = objblamt.GetRefoundAmountPatientAccountModyFyModyFy(Convert.ToInt32(PatientRegNO)); } prebalamt.PreBalance = ds1.Tables[1].Rows[0]["PreBalance"].ToString(); //Session["OPDIPDNO1"] = ds1.Tables[2].Rows[0]["OPD/IPDID"].ToString(); if (ds1.Tables[2].Rows.Count > 0) { foreach (DataRow dr in ds1.Tables[2].Rows) { if (dr["TDSAmount"].ToString() == "" || dr["TPAOtherDeduction"].ToString() == "") { dr["TDSAmount"] = 0; dr["TPAOtherDeduction"] = 0; } search.Add(new PreBalanceAmount { OPDIPDNO = dr["OPDIPDNO"].ToString(), BillType = dr["BillType"].ToString(), DrAmount = Convert.ToDecimal(dr["DrAmount"].ToString()), P_BillNo = dr["P_BillNo"].ToString(), TDSAmount = Convert.ToDecimal(dr["TDSAmount"].ToString()), TPAOtherDeduction = Convert.ToDecimal(dr["TPAOtherDeduction"].ToString()), CrAmount = Convert.ToDecimal(dr["CrAmount"].ToString()), BillDate = Convert.ToDateTime(dr["Date"]).ToString("dd-MM-yyyy"), BillNo = dr["BillNo"].ToString(), P_RegNo = dr["PatientRegNO"].ToString(), PrintRegNo = dr["P_RegNo"].ToString(), PaymentType = dr["PaymentType"].ToString(), OPDIPDID = dr["OPD/IPDID"].ToString(), PreBalance = ds1.Tables[1].Rows[0]["PreBalance"].ToString(), PatientAccountRowID = Convert.ToInt32(dr["PatientAccountRowID"].ToString()), PatinetType = dr["PatientType"].ToString(), }); } } else { search.Add(new PreBalanceAmount { PreBalance = "0", }); } return(new JsonResult { Data = search, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }