public JsonResult ShowPrefixMasterSetting()
        {
            BL_Prefix db = new BL_Prefix();


            return(new JsonResult {
                Data = db.SelectAllData(), JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
        public JsonResult ChkOPDBill(int FinancialID)
        {
            string    chk = "";
            BL_Prefix db  = new BL_Prefix();

            DataSet ds = db.ChkOPDBill(FinancialID);

            if (ds.Tables[0].Rows.Count > 0)
            {
                chk = "OPD Bill Number Stared at " + ds.Tables[0].Rows[0]["MinPrintRegNO"].ToString() + " and Last Number is " + ds.Tables[0].Rows[0]["MaxPrintRegNO"].ToString();
            }

            return(new JsonResult {
                Data = chk, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
        public JsonResult ChkStartingOpdNo(int StartingOPD, int FinancialID, string Type)
        {
            string chk = "";

            if (Type == "StartingOpdNo")
            {
                BL_Prefix db = new BL_Prefix();
                if (db.ChkStartingOpdNo(StartingOPD, FinancialID))
                {
                    chk = "OPD number is Not Use";
                }
                else
                {
                    chk = "OPD number is Use";
                }
            }

            else if (Type == "StartingPatientOPDBillNo")
            {
                BL_Prefix db = new BL_Prefix();
                if (db.ChkStartingPatientOPDBillNo(StartingOPD, FinancialID))
                {
                    chk = "OPD Bill Number is Not Use";
                }
                else
                {
                    chk = "OPD Bill number is Use";
                }
            }

            else if (Type == "StartingPatientIPD")
            {
                BL_Prefix db = new BL_Prefix();
                if (db.ChkStartingPatientIPD(StartingOPD, FinancialID))
                {
                    chk = "IPD number is Not Use";
                }
                else
                {
                    chk = "IPD number is Use";
                }
            }

            else if (Type == "StartingIPDBillNo")
            {
                BL_Prefix db = new BL_Prefix();
                if (db.ChkStartingIPDBillNo(StartingOPD, FinancialID))
                {
                    chk = "IPD Bill number is Not Use";
                }
                else
                {
                    chk = "IPD Bill number is Use";
                }
            }

            else if (Type == "StartingPatientProvisionalBillNo")
            {
                BL_Prefix db = new BL_Prefix();
                if (db.ChkStartingPatientProvisionalBillNo(StartingOPD, FinancialID))
                {
                    chk = "ProvisionalBill number is Not Use";
                }
                else
                {
                    chk = "ProvisionalBill number is Use";
                }
            }

            else if (Type == "StartingFinalBillNo")
            {
                BL_Prefix db = new BL_Prefix();
                if (db.ChkStartingFinalBillNo(StartingOPD, FinancialID))
                {
                    chk = "FinalBill number is Not Use";
                }
                else
                {
                    chk = "FinalBill number is Use";
                }
            }

            else if (Type == "StartingLabNo")
            {
                BL_Prefix db = new BL_Prefix();
                if (db.ChkStartingLabNo(StartingOPD, FinancialID))
                {
                    chk = "Lab number is Not Use";
                }
                else
                {
                    chk = "Lab number is Use";
                }
            }

            else if (Type == "StartingLabBillNo")
            {
                BL_Prefix db = new BL_Prefix();
                if (db.ChkStartingLabBillNo(StartingOPD, FinancialID))
                {
                    chk = "LabBill number is Not Use";
                }
                else
                {
                    chk = "LabBill number is Use";
                }
            }

            return(new JsonResult {
                Data = chk, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }