public PartialViewResult MercantRequisitionGrid(string Super = "", string Distributor = "", string search = "", string Status = "") { if (string.IsNullOrEmpty(Super) && string.IsNullOrEmpty(Distributor) && string.IsNullOrEmpty(search) && string.IsNullOrEmpty(Status)) { var MerchantList = MemberRequisitionReportModel.GetAllMerchantRequisitionReport(MemberCurrentUser.MEM_ID.ToString(), Status); return(PartialView("MercantRequisitionGrid", MerchantList)); } else if (string.IsNullOrEmpty(Super) && string.IsNullOrEmpty(Distributor) && string.IsNullOrEmpty(search) && !string.IsNullOrEmpty(Status)) { var MerchantList = MemberRequisitionReportModel.GetAllMerchantRequisitionReport(MemberCurrentUser.MEM_ID.ToString(), Status); return(PartialView("MercantRequisitionGrid", MerchantList)); } else if (!string.IsNullOrEmpty(Super) && !string.IsNullOrEmpty(Distributor) && !string.IsNullOrEmpty(search) && string.IsNullOrEmpty(Status)) { var MerchantList = MemberRequisitionReportModel.GetMerchantRequisitionReport(Super, Distributor, search, Status); return(PartialView("MercantRequisitionGrid", MerchantList)); } else if (!string.IsNullOrEmpty(Super) && !string.IsNullOrEmpty(Distributor) && !string.IsNullOrEmpty(search) && !string.IsNullOrEmpty(Status)) { var MerchantList = MemberRequisitionReportModel.GetMerchantRequisitionReport(Super, Distributor, search, Status); return(PartialView("MercantRequisitionGrid", MerchantList)); } else if (!string.IsNullOrEmpty(Super) && !string.IsNullOrEmpty(Distributor) && string.IsNullOrEmpty(search) && string.IsNullOrEmpty(Status)) { var MerchantList = MemberRequisitionReportModel.GetMerchantRequisitionReport(Super, Distributor, search, Status); return(PartialView("MercantRequisitionGrid", MerchantList)); } else if (!string.IsNullOrEmpty(Super) && !string.IsNullOrEmpty(Distributor) && string.IsNullOrEmpty(search) && !string.IsNullOrEmpty(Status)) { var MerchantList = MemberRequisitionReportModel.GetMerchantRequisitionReport(Super, Distributor, search, Status); return(PartialView("MercantRequisitionGrid", MerchantList)); } else if (!string.IsNullOrEmpty(Super) && string.IsNullOrEmpty(Distributor) && string.IsNullOrEmpty(search) && string.IsNullOrEmpty(Status)) { var MerchantList = MemberRequisitionReportModel.GetMerchantRequisitionReport(Super, Distributor, search, Status); return(PartialView("MercantRequisitionGrid", MerchantList)); } else if (!string.IsNullOrEmpty(Super) && string.IsNullOrEmpty(Distributor) && string.IsNullOrEmpty(search) && !string.IsNullOrEmpty(Status)) { var MerchantList = MemberRequisitionReportModel.GetMerchantRequisitionReport(Super, Distributor, search, Status); return(PartialView("MercantRequisitionGrid", MerchantList)); } return(PartialView()); }
private IGrid <TBL_BALANCE_TRANSFER_LOGS> CreateExportMerchantGrid(string Super, string Distributor, string Disid, string statusval, string DateFrom = "", string Date_To = "") { var db = new DBContext(); var Adminrequisition = new List <TBL_BALANCE_TRANSFER_LOGS>(); if (string.IsNullOrEmpty(Super) && string.IsNullOrEmpty(Distributor) && string.IsNullOrEmpty(Disid) && string.IsNullOrEmpty(statusval)) { Adminrequisition = MemberRequisitionReportModel.GetAllMerchantRequisitionReport(MemberCurrentUser.MEM_ID.ToString(), statusval, DateFrom, Date_To); } else if (string.IsNullOrEmpty(Super) && string.IsNullOrEmpty(Distributor) && string.IsNullOrEmpty(Disid) && !string.IsNullOrEmpty(statusval)) { Adminrequisition = MemberRequisitionReportModel.GetAllMerchantRequisitionReport(MemberCurrentUser.MEM_ID.ToString(), statusval, DateFrom, Date_To); } else if (!string.IsNullOrEmpty(Super) && !string.IsNullOrEmpty(Distributor) && !string.IsNullOrEmpty(Disid) && string.IsNullOrEmpty(statusval)) { Adminrequisition = MemberRequisitionReportModel.GetMerchantRequisitionReport(Super, Distributor, Disid, statusval, DateFrom, Date_To); } else if (!string.IsNullOrEmpty(Super) && !string.IsNullOrEmpty(Distributor) && !string.IsNullOrEmpty(Disid) && !string.IsNullOrEmpty(statusval)) { Adminrequisition = MemberRequisitionReportModel.GetMerchantRequisitionReport(Super, Distributor, Disid, statusval, DateFrom, Date_To); } else if (!string.IsNullOrEmpty(Super) && !string.IsNullOrEmpty(Distributor) && string.IsNullOrEmpty(Disid) && string.IsNullOrEmpty(statusval)) { Adminrequisition = MemberRequisitionReportModel.GetMerchantRequisitionReport(Super, Distributor, Disid, statusval, DateFrom, Date_To); } else if (!string.IsNullOrEmpty(Super) && !string.IsNullOrEmpty(Distributor) && string.IsNullOrEmpty(Disid) && !string.IsNullOrEmpty(statusval)) { Adminrequisition = MemberRequisitionReportModel.GetMerchantRequisitionReport(Super, Distributor, Disid, statusval, DateFrom, Date_To); } else if (!string.IsNullOrEmpty(Super) && string.IsNullOrEmpty(Distributor) && string.IsNullOrEmpty(Disid) && string.IsNullOrEmpty(statusval)) { Adminrequisition = MemberRequisitionReportModel.GetMerchantRequisitionReport(MemberCurrentUser.MEM_ID.ToString(), Distributor, Disid, statusval, DateFrom, Date_To); //Adminrequisition = MemberRequisitionReportModel.GetAllMerchantRequisitionReport(MemberCurrentUser.MEM_ID.ToString(), statusval, DateFrom, Date_To); } else if (!string.IsNullOrEmpty(Super) && string.IsNullOrEmpty(Distributor) && string.IsNullOrEmpty(Disid) && !string.IsNullOrEmpty(statusval)) { Adminrequisition = MemberRequisitionReportModel.GetMerchantRequisitionReport(MemberCurrentUser.MEM_ID.ToString(), Distributor, Disid, statusval, DateFrom, Date_To); } IGrid <TBL_BALANCE_TRANSFER_LOGS> grid = new Grid <TBL_BALANCE_TRANSFER_LOGS>(Adminrequisition); grid.ViewContext = new ViewContext { HttpContext = HttpContext }; grid.Query = Request.QueryString; grid.Columns.Add(model => model.Serial_No).Titled("Sr Id"); //grid.Columns.Add(model => model.ToUser).Titled("To User"); grid.Columns.Add(model => model.FromUser).Titled("User Name"); grid.Columns.Add(model => model.REQUEST_DATE).Titled("Req Date").Formatted("{0:yyyy-MM-dd}").MultiFilterable(true); grid.Columns.Add(model => model.AMOUNT).Titled("Amount"); grid.Columns.Add(model => model.BANK_ACCOUNT).Titled("Bank Acnt"); grid.Columns.Add(model => model.TRANSACTION_DETAILS).Titled("Pay Method"); grid.Columns.Add(model => model.STATUS).Titled("STATUS"); grid.Columns.Add(model => model.APPROVAL_DATE).Titled("Apprv/Decline Date").Formatted("{0:yyyy-MM-dd}").MultiFilterable(true); grid.Columns.Add(model => model.APPROVED_BY).Titled("Apprv By"); grid.Pager = new GridPager <TBL_BALANCE_TRANSFER_LOGS>(grid); grid.Processors.Add(grid.Pager); grid.Pager.RowsPerPage = 1000000; foreach (IGridColumn column in grid.Columns) { column.Filter.IsEnabled = true; column.Sort.IsEnabled = true; } return(grid); }