Esempio n. 1
0
        public ActionResult UserInfoByEmpId(string empId)

        {
            string userName   = "";
            string branchCode = "";
            string branchName = "";

            try
            {
                WebRef.OBLAPP oblApp = new WebRef.OBLAPP();
                DataTable     dt     = oblApp.GetByUserID(empId);

                if (dt.Rows.Count > 0)
                {
                    foreach (DataRow dataRow in dt.Rows)
                    {
                        userName   = (string)dataRow[3];
                        branchCode = (string)dataRow[22];
                        branchName = (string)dataRow[21];
                    }

                    long branchId = db.BRANCHINFO.Where(x => x.BRANCHCODE == branchCode).Select(x => x.ID).FirstOrDefault();
                    //return Json(new { userName = "******", branchId = 5, branchName = "Khatungonj" }, JsonRequestBehavior.AllowGet);

                    return(Json(new { flag = 0, userName, branchId, branchName }, JsonRequestBehavior.AllowGet));
                }
                return(Json(new{ flag = 1 }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception exception)
            {
                return(Json(new { flag = 2, msg = exception.Message }, JsonRequestBehavior.DenyGet));
            }
        }
Esempio n. 2
0
        public ActionResult Index()
        {
            try
            {
                OCCUSER user = (OCCUSER)Session["User"];
                AuthorizerDashboardVM aVm = new AuthorizerDashboardVM();

                WebRef.OBLAPP         oblApp = new WebRef.OBLAPP();
                System.Data.DataTable dt     = oblApp.GetByUserID(user.EMPLOYEEID);
                foreach (DataRow dataRow in dt.Rows)
                {
                    aVm.EmployeeInfoVm.BranchName  = (string)dataRow[21];
                    aVm.EmployeeInfoVm.Email       = (string)dataRow[9];
                    aVm.EmployeeInfoVm.EmployeeId  = (string)dataRow[2];
                    aVm.EmployeeInfoVm.JobTitle    = (string)dataRow[7];
                    aVm.EmployeeInfoVm.Name        = (string)dataRow[3];
                    aVm.EmployeeInfoVm.PreDeptName = (string)dataRow[17];
                }

                var pendingReqList      = db.CARDCHEREUISITION.Where(x => x.ISDELETE != true).Where(x => x.STATUS == 4).OrderByDescending(x => x.ID).ToList();
                var pendingReqListCount = pendingReqList.Count;
                aVm.PendingRequisitionCount = pendingReqListCount;
                aVm.PendingRequisitionList  = pendingReqList.Take(5).ToList();


                var pendingChequeList      = db.CARDCHTRAN.Where(x => x.STATUS == 13).Where(x => x.ISDELETE != true).OrderByDescending(x => x.ID).ToList();
                var pendingChequeListCount = pendingChequeList.Count;
                aVm.PendingCardChequeAmount = pendingChequeList.Sum(x => x.AMOUNT);
                aVm.PendingCardChequeCount  = pendingChequeListCount;
                aVm.PendingCardChequeList   = pendingChequeList.Take(5).ToList();

                var authReqList      = db.CARDCHEREUISITION.Where(x => x.ISDELETE != true).Where(x => x.STATUS == 5).OrderByDescending(x => x.ID).ToList();
                var authReqListCount = authReqList.Count;
                aVm.AuthRequisitionCount      = authReqListCount;
                aVm.AuthorizedRequisitionList = authReqList.Take(5).ToList();


                var authChequeList      = db.CARDCHTRAN.Where(x => x.STATUS == 14).Where(x => x.ISDELETE != true).OrderByDescending(x => x.ID).ToList();
                var authChequeListCount = authChequeList.Count;
                aVm.AuthorizedCardChequeAmount = authChequeList.Sum(x => x.AMOUNT);
                aVm.AuthCardCHequeCount        = authChequeListCount;
                aVm.AuthorizedCardChequeList   = authChequeList.Take(5).ToList();

                return(View(aVm));
            }
            catch (Exception)
            {
                return(RedirectToAction("Error", "Home", new { Area = "" }));
            }

            // return View();
        }
Esempio n. 3
0
        public ActionResult Index()
        {
            try
            {
                OCCUSER           user = (OCCUSER)Session["User"];
                TellerDashBoardVM aVm  = new TellerDashBoardVM();

                var visaList = db.DEPOSIT.Where(x => x.ISDELETE == false).Where(x => x.CREATEDBY == user.ID).OrderByDescending(x => x.ID).ToList();
                aVm.TotalVisaPayment           = visaList.Count;
                aVm.TotalVisaPaymentCollection = (decimal)visaList.Sum(x => x.AMOUNT);
                visaList = visaList.Take(5).ToList();


                var requisitionList = db.CARDCHEREUISITION.Where(x => x.CREATEDBY == user.ID).Where(x => x.ISDELETE != true).OrderByDescending(x => x.ID).ToList();
                aVm.TotalReqisitionRequest = requisitionList.Count;
                requisitionList            = requisitionList.Take(5).ToList();


                var cardchtanList = db.CARDCHTRAN.Where(x => x.CREATEDBY == user.ID).Where(x => x.ISDELETE != true).OrderByDescending(x => x.ID).ToList();
                aVm.TotalCardPayment         = cardchtanList.Sum(x => x.AMOUNT);
                aVm.TotalChequePaymentNumber = cardchtanList.Count;
                cardchtanList = cardchtanList.Take(5).ToList();


                WebRef.OBLAPP oblApp = new WebRef.OBLAPP();
                DataTable     dt     = oblApp.GetByUserID(user.EMPLOYEEID);
                foreach (DataRow dataRow in dt.Rows)
                {
                    aVm.EmployeeInfoVm.BranchName  = (string)dataRow[21];
                    aVm.EmployeeInfoVm.Email       = (string)dataRow[9];
                    aVm.EmployeeInfoVm.EmployeeId  = (string)dataRow[2];
                    aVm.EmployeeInfoVm.JobTitle    = (string)dataRow[7];
                    aVm.EmployeeInfoVm.Name        = (string)dataRow[3];
                    aVm.EmployeeInfoVm.PreDeptName = (string)dataRow[17];
                }


                //var visaPaymentList = db.DEPOSIT.Where(x => x.CREATEDBY == user.ID).ToList();
                aVm.Deposits     = visaList;
                aVm.Requisitions = requisitionList;
                aVm.ChequeTrans  = cardchtanList;
                // aVm.TotalVisaPayment = visaPaymentList.Count;
                // aVm.TotalVisaPaymentCollection = (decimal)visaPaymentList.Sum(x => x.AMOUNT);
                return(View(aVm));
            }
            catch (Exception exception)
            {
                return(RedirectToAction("Error", "Home", new { Area = "" }));
            }
        }
Esempio n. 4
0
        public ActionResult Index()
        {
            try
            {
                OCCUSER user = (OCCUSER)Session["User"];
                TellerDashBoardVM aVm = new TellerDashBoardVM();

                var visaList = db.DEPOSIT.Where(x => x.ISDELETE == false).Where(x => x.CREATEDBY == user.ID).OrderByDescending(x => x.ID).ToList();
                aVm.TotalVisaPayment = visaList.Count;
                aVm.TotalVisaPaymentCollection = (decimal)visaList.Sum(x => x.AMOUNT);
                visaList = visaList.Take(5).ToList();

                var requisitionList = db.CARDCHEREUISITION.Where(x => x.CREATEDBY == user.ID).Where(x=>x.ISDELETE!=true).OrderByDescending(x => x.ID).ToList();
                aVm.TotalReqisitionRequest = requisitionList.Count;
                requisitionList = requisitionList.Take(5).ToList();

                var cardchtanList = db.CARDCHTRAN.Where(x => x.CREATEDBY == user.ID).Where(x=>x.ISDELETE!=true).OrderByDescending(x => x.ID).ToList();
                aVm.TotalCardPayment = cardchtanList.Sum(x => x.AMOUNT);
                aVm.TotalChequePaymentNumber = cardchtanList.Count;
                cardchtanList = cardchtanList.Take(5).ToList();

                WebRef.OBLAPP oblApp = new WebRef.OBLAPP();
                DataTable dt = oblApp.GetByUserID(user.EMPLOYEEID);
                foreach (DataRow dataRow in dt.Rows)
                {
                    aVm.EmployeeInfoVm.BranchName = (string)dataRow[21];
                    aVm.EmployeeInfoVm.Email = (string)dataRow[9];
                    aVm.EmployeeInfoVm.EmployeeId = (string)dataRow[2];
                    aVm.EmployeeInfoVm.JobTitle = (string)dataRow[7];
                    aVm.EmployeeInfoVm.Name = (string)dataRow[3];
                    aVm.EmployeeInfoVm.PreDeptName = (string)dataRow[17];

                }

                //var visaPaymentList = db.DEPOSIT.Where(x => x.CREATEDBY == user.ID).ToList();
                aVm.Deposits = visaList;
                aVm.Requisitions = requisitionList;
                aVm.ChequeTrans = cardchtanList;
               // aVm.TotalVisaPayment = visaPaymentList.Count;
               // aVm.TotalVisaPaymentCollection = (decimal)visaPaymentList.Sum(x => x.AMOUNT);
                return View(aVm);
            }
            catch (Exception exception)
            {

                return RedirectToAction("Error", "Home", new { Area = "" });
            }
        }
Esempio n. 5
0
        public ActionResult Index(DateTime?startDate, DateTime?endDate, string btnName)
        {
            try
            {
                if (startDate != null || endDate != null)
                {
                    OCCUSER          user = (OCCUSER)Session["User"];
                    AdminDashboardVM aVm  = new AdminDashboardVM();

                    var visaList = db.DEPOSIT.Where(x => x.ISDELETE == false).OrderByDescending(x => x.ID).ToList();
                    aVm.TotalVisaPayment           = visaList.Count;
                    aVm.TotalVisaPaymentCollection = (decimal)visaList.Sum(x => x.AMOUNT);
                    visaList = visaList.Take(5).ToList();


                    var requisitionList = db.CARDCHEREUISITION.Where(x => x.ISDELETE != true).OrderByDescending(x => x.ID).ToList();
                    aVm.TotalReqisitionRequest = requisitionList.Count;
                    requisitionList            = requisitionList.Take(5).ToList();


                    var cardchtanList = db.CARDCHTRAN.Where(x => x.ISDELETE != true).OrderByDescending(x => x.ID).ToList();
                    aVm.TotalCardPayment         = cardchtanList.Sum(x => x.AMOUNT);
                    aVm.TotalChequePaymentNumber = cardchtanList.Count;
                    cardchtanList = cardchtanList.Take(5).ToList();



                    WebRef.OBLAPP oblApp = new WebRef.OBLAPP();
                    DataTable     dt     = oblApp.GetByUserID(user.EMPLOYEEID);
                    foreach (DataRow dataRow in dt.Rows)
                    {
                        aVm.EmployeeInfoVm.BranchName  = (string)dataRow[21];
                        aVm.EmployeeInfoVm.Email       = (string)dataRow[9];
                        aVm.EmployeeInfoVm.EmployeeId  = (string)dataRow[2];
                        aVm.EmployeeInfoVm.JobTitle    = (string)dataRow[7];
                        aVm.EmployeeInfoVm.Name        = (string)dataRow[3];
                        aVm.EmployeeInfoVm.PreDeptName = (string)dataRow[17];
                    }

                    if (btnName == "visa")
                    {
                        visaList                       = db.DEPOSIT.Where(x => x.ISDELETE == false).Where(x => x.CREATEDON.Value.Date >= startDate.Value.Date).Where(x => x.CREATEDON.Value.Date <= endDate.Value.Date).ToList();
                        aVm.TotalVisaPayment           = visaList.Count;
                        aVm.TotalVisaPaymentCollection = (decimal)visaList.Sum(x => x.AMOUNT);
                        //aVm.Deposits = List;
                    }
                    else if (btnName == "requisition")
                    {
                        requisitionList            = db.CARDCHEREUISITION.Where(x => x.ISDELETE != true).Where(x => x.CREATEDON.Date >= startDate.Value.Date).Where(x => x.CREATEDON.Date <= endDate.Value.Date).ToList();
                        aVm.TotalReqisitionRequest = requisitionList.Count;
                    }
                    else if (btnName == "cardcheque")
                    {
                        cardchtanList                = db.CARDCHTRAN.Where(x => x.ISDELETE != true).Where(x => x.CREATEDON >= startDate).Where(x => x.CREATEDON <= endDate).ToList();
                        aVm.TotalCardPayment         = cardchtanList.Sum(x => x.AMOUNT);
                        aVm.TotalChequePaymentNumber = cardchtanList.Count;
                    }
                    aVm.Deposits     = visaList;
                    aVm.Requisitions = requisitionList;
                    aVm.ChequeTrans  = cardchtanList;

                    return(View(aVm));
                }
                return(RedirectToAction("Index"));
            }
            catch (Exception exception)
            {
                return(RedirectToAction("Error", "Home", new { Area = "" }));
            }
            //  return View();
        }
Esempio n. 6
0
        public ActionResult Index(DateTime? startDate, DateTime? endDate, string btnName)
        {
            try
            {
                if (startDate != null || endDate != null)
                {
                    OCCUSER user = (OCCUSER)Session["User"];
                    AuthorizerDashboardVM aVm = new AuthorizerDashboardVM();

                    WebRef.OBLAPP oblApp = new WebRef.OBLAPP();
                    System.Data.DataTable dt = oblApp.GetByUserID(user.EMPLOYEEID);
                    foreach (DataRow dataRow in dt.Rows)
                    {
                        aVm.EmployeeInfoVm.BranchName = (string)dataRow[21];
                        aVm.EmployeeInfoVm.Email = (string)dataRow[9];
                        aVm.EmployeeInfoVm.EmployeeId = (string)dataRow[2];
                        aVm.EmployeeInfoVm.JobTitle = (string)dataRow[7];
                        aVm.EmployeeInfoVm.Name = (string)dataRow[3];
                        aVm.EmployeeInfoVm.PreDeptName = (string)dataRow[17];
                    }

                    var pendingReqList = db.CARDCHEREUISITION.Where(x => x.ISDELETE == false).Where(x => x.STATUS == 4).OrderByDescending(x => x.ID).ToList();
                    var pendingReqListCount = pendingReqList.Count;
                    aVm.PendingRequisitionCount = pendingReqListCount;
                    aVm.PendingRequisitionList = pendingReqList.Take(5).ToList();

                    var pendingChequeList = db.CARDCHTRAN.Where(x => x.STATUS == 13).Where(x=>x.ISDELETE!=true).OrderByDescending(x => x.ID).ToList();
                    var pendingChequeListCount = pendingChequeList.Count;
                    aVm.PendingCardChequeAmount = pendingChequeList.Sum(x => x.AMOUNT);
                    aVm.PendingCardChequeCount = pendingChequeListCount;
                    aVm.PendingCardChequeList = pendingChequeList.Take(5).ToList();

                    var authReqList = db.CARDCHEREUISITION.Where(x => x.ISDELETE != true).Where(x => x.STATUS == 5).OrderByDescending(x => x.ID).ToList();
                    var authReqListCount = authReqList.Count;
                    aVm.AuthRequisitionCount = authReqListCount;
                    aVm.AuthorizedRequisitionList = authReqList.Take(5).ToList();

                    var authChequeList = db.CARDCHTRAN.Where(x => x.STATUS == 14).Where(x=>x.ISDELETE!=true).OrderByDescending(x => x.ID).ToList();
                    var authChequeListCount = authChequeList.Count;
                    aVm.AuthorizedCardChequeAmount = authChequeList.Sum(x => x.AMOUNT);
                    aVm.AuthCardCHequeCount = authChequeListCount;
                    aVm.AuthorizedCardChequeList = authChequeList.Take(5).ToList();

                    if (btnName == "pendingreq")
                    {
                        pendingReqList = db.CARDCHEREUISITION.Where(x => x.ISDELETE != true).Where(x => x.STATUS == 4).Where(x => x.CREATEDON >= startDate).Where(x => x.CREATEDON <= endDate).ToList();
                        pendingReqListCount = pendingReqList.Count;
                        aVm.PendingRequisitionCount = pendingReqListCount;
                        aVm.PendingRequisitionList = pendingReqList.ToList();
                        //aVm.Deposits = List;
                    }
                    else if (btnName == "pendingcc")
                    {
                        pendingChequeList = db.CARDCHTRAN.Where(x => x.STATUS == 13).Where(x => x.CREATEDON >= startDate).Where(x => x.CREATEDON <= endDate).Where(x=>x.ISDELETE!=true).ToList();
                        pendingChequeListCount = pendingChequeList.Count;
                        aVm.PendingCardChequeAmount = pendingChequeList.Sum(x => x.AMOUNT);
                        aVm.PendingCardChequeCount = pendingChequeListCount;
                        aVm.PendingCardChequeList = pendingChequeList.ToList();

                    }
                    else if (btnName == "authreq")
                    {
                        authReqList = db.CARDCHEREUISITION.Where(x => x.ISDELETE != true).Where(x => x.STATUS == 5).Where(x => x.CREATEDON >= startDate).Where(x => x.CREATEDON <= endDate).ToList();
                        authReqListCount = authReqList.Count;
                        aVm.AuthRequisitionCount = authReqListCount;
                        aVm.AuthorizedRequisitionList = authReqList.Take(5).ToList();

                    }

                    else if (btnName == "authcc")
                    {
                        authChequeList = db.CARDCHTRAN.Where(x => x.STATUS == 14).Where(x => x.CREATEDON >= startDate).Where(x => x.CREATEDON <= endDate).Where(x=>x.ISDELETE!=true).ToList();
                        authChequeListCount = authChequeList.Count;
                        aVm.AuthorizedCardChequeAmount = authChequeList.Sum(x => x.AMOUNT);
                        aVm.AuthCardCHequeCount = authChequeListCount;
                        aVm.AuthorizedCardChequeList = authChequeList.Take(5).ToList();

                    }
                    return View(aVm);
                }
                return RedirectToAction("Index");
            }
            catch (Exception exception)
            {
                return RedirectToAction("Error", "Home", new { Area = "" });
            }
        }
Esempio n. 7
0
        public ActionResult Index()
        {
            try
            {
                OCCUSER user = (OCCUSER)Session["User"];
                AuthorizerDashboardVM aVm = new AuthorizerDashboardVM();

                WebRef.OBLAPP oblApp = new WebRef.OBLAPP();
                System.Data.DataTable dt = oblApp.GetByUserID(user.EMPLOYEEID);
                foreach (DataRow dataRow in dt.Rows)
                {
                    aVm.EmployeeInfoVm.BranchName = (string)dataRow[21];
                    aVm.EmployeeInfoVm.Email = (string)dataRow[9];
                    aVm.EmployeeInfoVm.EmployeeId = (string)dataRow[2];
                    aVm.EmployeeInfoVm.JobTitle = (string)dataRow[7];
                    aVm.EmployeeInfoVm.Name = (string)dataRow[3];
                    aVm.EmployeeInfoVm.PreDeptName = (string)dataRow[17];
                }

                var pendingReqList = db.CARDCHEREUISITION.Where(x => x.ISDELETE != true).Where(x => x.STATUS == 4).OrderByDescending(x => x.ID).ToList();
                var pendingReqListCount = pendingReqList.Count;
                aVm.PendingRequisitionCount = pendingReqListCount;
                aVm.PendingRequisitionList = pendingReqList.Take(5).ToList();

                var pendingChequeList = db.CARDCHTRAN.Where(x=>x.STATUS==13).Where(x=>x.ISDELETE!=true).OrderByDescending(x => x.ID).ToList();
                var pendingChequeListCount = pendingChequeList.Count;
                aVm.PendingCardChequeAmount = pendingChequeList.Sum(x => x.AMOUNT);
                aVm.PendingCardChequeCount = pendingChequeListCount;
                aVm.PendingCardChequeList = pendingChequeList.Take(5).ToList();

                var authReqList = db.CARDCHEREUISITION.Where(x=>x.ISDELETE!=true).Where(x => x.STATUS ==5).OrderByDescending(x => x.ID).ToList();
                var authReqListCount = authReqList.Count;
                aVm.AuthRequisitionCount = authReqListCount;
                aVm.AuthorizedRequisitionList = authReqList.Take(5).ToList();

                var authChequeList = db.CARDCHTRAN.Where(x => x.STATUS == 14).Where(x=>x.ISDELETE!=true).OrderByDescending(x => x.ID).ToList();
                var authChequeListCount = authChequeList.Count;
                aVm.AuthorizedCardChequeAmount = authChequeList.Sum(x => x.AMOUNT);
                aVm.AuthCardCHequeCount = authChequeListCount;
                aVm.AuthorizedCardChequeList = authChequeList.Take(5).ToList();

                return View(aVm);
            }
            catch (Exception)
            {

                return RedirectToAction("Error", "Home", new { Area = "" });
            }

               // return View();
        }
Esempio n. 8
0
        public ActionResult Index(DateTime?startDate, DateTime?endDate, string btnName)
        {
            try
            {
                if (startDate != null || endDate != null)
                {
                    OCCUSER user = (OCCUSER)Session["User"];
                    AuthorizerDashboardVM aVm = new AuthorizerDashboardVM();

                    WebRef.OBLAPP         oblApp = new WebRef.OBLAPP();
                    System.Data.DataTable dt     = oblApp.GetByUserID(user.EMPLOYEEID);
                    foreach (DataRow dataRow in dt.Rows)
                    {
                        aVm.EmployeeInfoVm.BranchName  = (string)dataRow[21];
                        aVm.EmployeeInfoVm.Email       = (string)dataRow[9];
                        aVm.EmployeeInfoVm.EmployeeId  = (string)dataRow[2];
                        aVm.EmployeeInfoVm.JobTitle    = (string)dataRow[7];
                        aVm.EmployeeInfoVm.Name        = (string)dataRow[3];
                        aVm.EmployeeInfoVm.PreDeptName = (string)dataRow[17];
                    }

                    var pendingReqList      = db.CARDCHEREUISITION.Where(x => x.ISDELETE == false).Where(x => x.STATUS == 4).OrderByDescending(x => x.ID).ToList();
                    var pendingReqListCount = pendingReqList.Count;
                    aVm.PendingRequisitionCount = pendingReqListCount;
                    aVm.PendingRequisitionList  = pendingReqList.Take(5).ToList();


                    var pendingChequeList      = db.CARDCHTRAN.Where(x => x.STATUS == 13).Where(x => x.ISDELETE != true).OrderByDescending(x => x.ID).ToList();
                    var pendingChequeListCount = pendingChequeList.Count;
                    aVm.PendingCardChequeAmount = pendingChequeList.Sum(x => x.AMOUNT);
                    aVm.PendingCardChequeCount  = pendingChequeListCount;
                    aVm.PendingCardChequeList   = pendingChequeList.Take(5).ToList();

                    var authReqList      = db.CARDCHEREUISITION.Where(x => x.ISDELETE != true).Where(x => x.STATUS == 5).OrderByDescending(x => x.ID).ToList();
                    var authReqListCount = authReqList.Count;
                    aVm.AuthRequisitionCount      = authReqListCount;
                    aVm.AuthorizedRequisitionList = authReqList.Take(5).ToList();


                    var authChequeList      = db.CARDCHTRAN.Where(x => x.STATUS == 14).Where(x => x.ISDELETE != true).OrderByDescending(x => x.ID).ToList();
                    var authChequeListCount = authChequeList.Count;
                    aVm.AuthorizedCardChequeAmount = authChequeList.Sum(x => x.AMOUNT);
                    aVm.AuthCardCHequeCount        = authChequeListCount;
                    aVm.AuthorizedCardChequeList   = authChequeList.Take(5).ToList();


                    if (btnName == "pendingreq")
                    {
                        pendingReqList              = db.CARDCHEREUISITION.Where(x => x.ISDELETE != true).Where(x => x.STATUS == 4).Where(x => x.CREATEDON >= startDate).Where(x => x.CREATEDON <= endDate).ToList();
                        pendingReqListCount         = pendingReqList.Count;
                        aVm.PendingRequisitionCount = pendingReqListCount;
                        aVm.PendingRequisitionList  = pendingReqList.ToList();
                        //aVm.Deposits = List;
                    }
                    else if (btnName == "pendingcc")
                    {
                        pendingChequeList           = db.CARDCHTRAN.Where(x => x.STATUS == 13).Where(x => x.CREATEDON >= startDate).Where(x => x.CREATEDON <= endDate).Where(x => x.ISDELETE != true).ToList();
                        pendingChequeListCount      = pendingChequeList.Count;
                        aVm.PendingCardChequeAmount = pendingChequeList.Sum(x => x.AMOUNT);
                        aVm.PendingCardChequeCount  = pendingChequeListCount;
                        aVm.PendingCardChequeList   = pendingChequeList.ToList();
                    }
                    else if (btnName == "authreq")
                    {
                        authReqList                   = db.CARDCHEREUISITION.Where(x => x.ISDELETE != true).Where(x => x.STATUS == 5).Where(x => x.CREATEDON >= startDate).Where(x => x.CREATEDON <= endDate).ToList();
                        authReqListCount              = authReqList.Count;
                        aVm.AuthRequisitionCount      = authReqListCount;
                        aVm.AuthorizedRequisitionList = authReqList.Take(5).ToList();
                    }

                    else if (btnName == "authcc")
                    {
                        authChequeList                 = db.CARDCHTRAN.Where(x => x.STATUS == 14).Where(x => x.CREATEDON >= startDate).Where(x => x.CREATEDON <= endDate).Where(x => x.ISDELETE != true).ToList();
                        authChequeListCount            = authChequeList.Count;
                        aVm.AuthorizedCardChequeAmount = authChequeList.Sum(x => x.AMOUNT);
                        aVm.AuthCardCHequeCount        = authChequeListCount;
                        aVm.AuthorizedCardChequeList   = authChequeList.Take(5).ToList();
                    }
                    return(View(aVm));
                }
                return(RedirectToAction("Index"));
            }
            catch (Exception exception)
            {
                return(RedirectToAction("Error", "Home", new { Area = "" }));
            }
        }