public ActionResult ManualCommissionReport(ManualCommissionReportCommon model)
        {
            // Start User Id from mobile number
            var list = _buss.GetSearchUserList(model.MobileNumber, "mobileno");

            if (string.IsNullOrEmpty(model.MobileNumber))
            {
                list = null;
            }
            if (list != null)
            {
                var userinfo = list.FirstOrDefault();
                if (userinfo == null)
                {
                    ViewBag.EmptyMessage = "True";
                    return(View());
                }
                model.UserId = userinfo.UserID.ToString();
            }
            else
            {
                ViewBag.EmptyMessage = "True";
                return(View());
            }
            //Ends
            DynamicReportFilter models = new DynamicReportFilter();

            models = model.MapObject <DynamicReportFilter>();

            List <DynamicReportCommon> dynamicReportCommons = _dynamicReport.GetManualCommissionReport(models);
            List <DynamicReportModel>  reportModel          = dynamicReportCommons.MapObjects <DynamicReportModel>();
            Decimal Total_Commission = 0;

            foreach (var item in reportModel)
            {
                Total_Commission = Total_Commission + Convert.ToDecimal(item.CommissionEarned);
            }

            ViewBag.totalcommission = (float)Total_Commission;

            IDictionary <string, string> param = new Dictionary <string, string>();

            param.Add("SubscriberNo", "Mobile Number");
            param.Add("ProductName", "Product Name");
            param.Add("TxnType", "Txn Type");
            param.Add("Amount", "Amount");
            param.Add("CommissionEarned", "Commission Earned");
            param.Add("Remarks", "Remarks");
            param.Add("TxnDate", "Txn Date");
            ProjectGrid.column = param;
            //Ends
            var grid = ProjectGrid.MakeGrid(reportModel, "hidebreadcrumb", "", 10, false, "", "", "", "", "", "", "datatable-total", true);

            ViewData["grid"] = grid;

            return(View());
        }
        public ActionResult ManualCommissionReport(string mobileno)
        {
            IWalletUserBusiness _walletUserBusiness = new WalletUserBusiness();
            var userinfo = _walletUserBusiness.UserInfo(mobileno);

            if (string.IsNullOrEmpty(userinfo.UserId))
            {
                ViewBag.EmptyMessage = "True";
                return(View());
            }

            string UserId = userinfo.UserId.ToString();

            //Ends
            List <DynamicReportCommon> dynamicReportCommons = _dynamicReport.GetManualCommissionReport(UserId);
            List <DynamicReportModel>  reportModel          = dynamicReportCommons.MapObjects <DynamicReportModel>();
            Decimal Total_Commission = 0;

            foreach (var item in reportModel)
            {
                Total_Commission = Total_Commission + Convert.ToDecimal(item.CommissionEarned);
            }

            ViewBag.totalcommission = (float)Total_Commission;

            IDictionary <string, string> param = new Dictionary <string, string>();

            param.Add("TxnDate", "Txn Date");
            param.Add("TxnType", "Txn Type");
            param.Add("Remarks", "Remarks");
            param.Add("ProductName", "Product Name");
            param.Add("CommissionEarned", "Commission Earned");
            param.Add("Amount", "Amount");
            ProjectGrid.column = param;
            //Ends
            var grid = ProjectGrid.MakeGrid(reportModel, "hidebreadcrumb", "", 10, false, "", "", "", "", "", "");

            ViewData["grid"] = grid;

            return(View());
        }