public JsonResult DeleteCheckBook(int ChequeBookID)
        {
            string _Del = null;

            try
            {
                KeystoneProject.Buisness_Logic.MasterFinacialAccounts.BL_ChequeBook objdb = new BL_ChequeBook();
                ChequeBook objSG = new Models.MasterFinacialAccounts.ChequeBook();

                int DependaincyName = objdb.DeleteCheckBook(ChequeBookID);

                if (DependaincyName == 1)
                {
                    _Del = "CheckBook Deleted Successfully";
                }
                else
                {
                    _Del = "Can not Delete";
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(new JsonResult {
                Data = _Del, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
        public JsonResult EditChequeBook(int ChequeBookID)
        {
            KeystoneProject.Buisness_Logic.MasterFinacialAccounts.BL_ChequeBook objDBService = new BL_ChequeBook();
            ChequeBook        ServiceModl = new ChequeBook();
            List <ChequeBook> SearchList  = new List <ChequeBook>();


            DataSet ds = objDBService.FillData(ChequeBookID);

            ServiceModl.ChequeBookID = ds.Tables[0].Rows[0]["ChequeBookID"].ToString();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                SearchList.Add(new ChequeBook
                {
                    BankID         = dr["BankID"].ToString(),
                    BankName       = dr["BankName"].ToString(),
                    BankAccountID  = dr["BankAccountID"].ToString(),
                    AccountName    = dr["AccountName"].ToString(),
                    ChequeBookID   = dr["ChequeBookID"].ToString(),
                    ChequeLayoutID = dr["ChequeLayoutID"].ToString(),
                    LayoutName     = dr["LayoutName"].ToString(),
                    ChequeBookName = dr["BookName"].ToString(),
                    ChequeNoFrom   = dr["ChequeSNo"].ToString(),
                    ChequeNoTo     = dr["ChequeENo"].ToString(),
                });
            }

            return(new JsonResult {
                Data = SearchList, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
        public JsonResult ShowAllChequeBook()
        {
            BL_ChequeBook db = new BL_ChequeBook();

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