public ActionResult Index() { string userid = Session["UserId"].ToString(); var cardCommonList = _card.GetCardList(userid).MapObjects <CardModel>(); List <CardModel> cardModels = new List <CardModel>(); var cardType = _card.GetCardType(); foreach (var item in cardCommonList) { CardModel model = new CardModel(); model.FullName = item.FullName; model.UserId = item.UserId; model.Amount = item.Amount; model.CardId = item.CardId; model.CardNo = item.CardNo; model.CardType = item.CardType; model.CardTypeName = cardType.FirstOrDefault(x => x.Key == item.CardType).Value;; model.ExpiryDate = item.ExpiryDate; model.Status = item.Status.Trim();//== "Y" ? "checked" : ""; model.IsReceived = item.IsReceived.Trim(); model.ReceivedFrom = item.ReceivedFrom; cardModels.Add(model); } Dictionary <string, string> cardoptions = new Dictionary <string, string>() { { "0", "--Select Card Options--" }, { "1", "Add New Card" }, { "2", "Card Balance Add/Retrieve" }, { "3", "Card Transfer/Retrieve" } }; ViewBag.CardOptions = ApplicationUtilities.SetDDLValue(cardoptions, "", ""); return(View(cardModels)); }
public ActionResult ManageUser(UserCommon model) { ViewBag.Roles = ApplicationUtilities.SetDDLValue(LoadDropdownList("ManageUser") as Dictionary <string, string>, model.RoleId, "--Select Role--"); //model.Roles = LoadDropdownList("ManageUser") as List<SelectListItem>; string userId = ""; userId = model.UserID; if (!string.IsNullOrEmpty(model.UserID)) { if (string.IsNullOrEmpty(model.UserID.DecryptParameter())) { return(RedirectToAction("Index")); } model.UserID = userId.DecryptParameter(); } ModelStateValidation(String.IsNullOrEmpty(userId) ? "Insert" : "Update"); if (ModelState.IsValid) { model.ActionUser = Session["username"].ToString(); buss.ManageUser(model).SetMessageInTempData(this); return(RedirectToAction("Index")); } model.UserID = userId; return(View(model)); }
public ActionResult EditSearchUser(string UserId = "") { UserCommon commonModel = new UserCommon(); if (!string.IsNullOrEmpty(UserId)) { var id = UserId.DecryptParameter(); if (string.IsNullOrEmpty(id)) { return(RedirectToAction("SearchUser")); } string username = Session["username"].ToString(); commonModel = buss.GetSearchUserList(id, "userid", username).FirstOrDefault(); //commonModel = buss.GetUserById(id); commonModel.UserID = commonModel.UserID.EncryptParameter(); var rol = LoadDropdownList("ManageUser"); ViewBag.Roles = ApplicationUtilities.SetDDLValue(LoadDropdownList("ManageUser") as Dictionary <string, string>, commonModel.RoleId, "--Select Role--"); return(View(commonModel)); } else { ApplicationUtilities.ShowPopup(this, 1, "Something Went Wrong! "); return(RedirectToAction("SearchUser")); } //ViewBag.Roles = LoadDropdownList("ManageUser"); }
public ActionResult MerchantTransactionReport(DynamicReportFilter model) { var merchantList = _dynamicReport.MerchantDropdown(); ViewBag.MerchantList = ApplicationUtilities.SetDDLValue(merchantList as Dictionary <string, string>, model.MerchantId, "All Merchant"); List <MerchantTransactionCommon> reportModel = _dynamicReport.MerchantTransactionReport(model); IDictionary <string, string> param = new Dictionary <string, string>(); //param.Add("TxnId", "Txn Id"); //param.Add("MerchantId", "Merchant Id"); param.Add("MerchantName", "Merchant Name"); param.Add("MerchantCode", "Merchant Code"); param.Add("UserId", "Mobile Number"); param.Add("Amount", "Amount"); param.Add("CommissionAmt", "Commission Amount"); param.Add("CreatedDate", "Created Date"); ProjectGrid.column = param; //Ends var grid = ProjectGrid.MakeGrid(reportModel, "hidebreadcrumb", "", 10, false, "", "", "", "", "", "", "datatable-total", true); ViewData["grid"] = grid; return(View()); }
public JsonResult GetMuncipalityByDistrict(string district) { List <SelectListItem> list = new List <SelectListItem>(); list = ApplicationUtilities.SetDDLValue(LoadDropdownList("vdc_muncipality", district) as Dictionary <string, string>, ""); return(Json(new SelectList(list, "Value", "Text", JsonRequestBehavior.AllowGet))); }
public ActionResult PaymentGatewayTransactionReport(DynamicReportFilter model) { List <PaymentGatewayTransactionReport> paymentGatewayTransactionList = _dynamicReport.PaymentGatewayTransactionList(model); //List<DynamicReportModel> reportModel = dynamicReportCommons.MapObjects<DynamicReportModel>(); foreach (var item in paymentGatewayTransactionList) { item.Action = StaticData.GetActions("paymentGatewayTransaction", item.GatewayTxnId.EncryptParameter(), this); } IDictionary <string, string> param = new Dictionary <string, string>(); param.Add("TxnId", "Txn Id"); //param.Add("ServiceCharge", "Service Charge"); param.Add("GatewayName", "Gateway Name"); param.Add("GatewayTxnId", "Gateway Txn Id"); param.Add("AgentName", "Agent Name"); param.Add("Status", "Status"); param.Add("Amount", "Amount"); param.Add("TotalAmount", "Total Amount"); //param.Add("AgentId", "Agent Id"); //param.Add("UserId", "User Id"); //param.Add("TxnType", "Txn Type"); param.Add("CreatedDate", "Created Date"); param.Add("Action", "Action"); ProjectGrid.column = param; //Ends var grid = ProjectGrid.MakeGrid(paymentGatewayTransactionList, "hidebreadcrumb", "", 10, false, "", "", "", "", "", "", "datatable-total", true); ViewData["grid"] = grid; ViewBag.GatewayList = ApplicationUtilities.SetDDLValue(LoadDropdownList("pmtGt"), model.GatewayId, "Select Gateway"); return(View(model)); }
public ActionResult MerchantTransactionReport() { var merchantList = _dynamicReport.MerchantDropdown(); ViewBag.MerchantList = ApplicationUtilities.SetDDLValue(merchantList as Dictionary <string, string>, "", "All Merchant"); return(View()); }
public ActionResult TransactionReport(string Search = "", int Pagesize = 10) { DynamicReportFilter model = new DynamicReportFilter(); List <DynamicReportCommon> dynamicReportCommons = _dynamicReport.GetTransactionReport(model); List <DynamicReportModel> reportModel = dynamicReportCommons.MapObjects <DynamicReportModel>(); foreach (var item in reportModel) { item.Action = StaticData.GetActions("TransactionReport", item.AgentId.EncryptParameter(), this, "", "", item.TxnId); } //Column Creator IDictionary <string, string> param = new Dictionary <string, string>(); param.Add("TxnDate", "Txn Date"); param.Add("TxnId", "Txn Id"); param.Add("ProductName", "Product"); //param.Add("AgentId", "Agent Id"); param.Add("SubscriberNo", "Subscriber No."); param.Add("Amount", "Amount"); param.Add("TxnStatus", "Txn Status"); //param.Add("UserId", "User Id"); param.Add("Remarks", "Remarks"); param.Add("Action", "Action"); ProjectGrid.column = param; //Ends var grid = ProjectGrid.MakeGrid(reportModel, "hidebreadcrumb", Search, Pagesize, false, "", "", "Home", "", "", "", "datatable-total", true); ViewData["grid"] = grid; ViewBag.EmptyMessage = "False"; ViewBag.GatewayList = ApplicationUtilities.SetDDLValue(LoadDropdownList("pmtGt"), "", "Select Gateway"); ViewBag.Status = ApplicationUtilities.SetDDLValue(LoadDropdownList("status"), "", "Select Status"); ViewBag.Product = ApplicationUtilities.SetDDLValue(LoadDropdownList("productlist"), "", "Select Product"); return(View()); }
public ActionResult ManageGateway(string GatewayID = "") { GatewayCommon gatewaycommon = new GatewayCommon(); GatewayModel gatewaymodel = new GatewayModel(); if (!string.IsNullOrEmpty(GatewayID)) { string gateway_id = GatewayID.DecryptParameter(); if (!string.IsNullOrEmpty(gateway_id)) { gatewaycommon = buss.GetGatewayById(gateway_id); gatewaymodel.GatewayId = gatewaycommon.GatewayId.EncryptParameter(); gatewaymodel.GatewayName = gatewaycommon.GatewayName; gatewaymodel.GatewayUsername = gatewaycommon.GatewayUsername.DecryptParameter(); gatewaymodel.GatewayPwd = gatewaycommon.GatewayPwd.DecryptParameter(); gatewaymodel.GatewayBalance = gatewaycommon.GatewayBalance; gatewaymodel.GatewayURL = gatewaycommon.GatewayURL.DecryptParameter(); gatewaymodel.GatewayAccessCode = gatewaycommon.GatewayAccessCode.DecryptParameter(); gatewaymodel.GatewaySecurityCode = gatewaycommon.GatewaySecurityCode.DecryptParameter(); gatewaymodel.GatewayApitoken = gatewaycommon.GatewayApitoken.DecryptParameter(); gatewaymodel.GatewayStatus = gatewaycommon.GatewayStatus; gatewaymodel.IsDirectGateway = gatewaycommon.IsDirectGateway; gatewaymodel.GatewayType = gatewaycommon.GatewayType; gatewaymodel.GatewayCountry = gatewaycommon.GatewayCountry; gatewaymodel.GatewayCurrency = "NPR";//gatewaycommon.GatewayCurrency; gatewaymodel.GatewayContact = gatewaycommon.GatewayContact; } } gatewaymodel.GatewayCurrency = "NPR"; gatewaymodel.IsDirectGatewayList = LoadDropdownList("directindirect") as List <SelectListItem>; gatewaymodel.GatewayTypeList = LoadDropdownList("gatewaytype") as List <SelectListItem>; // gatewaymodel.GatewayCurrencyList = ApplicationUtilities.SetDDLValue(ICB.sproc_get_dropdown_list("20"), gatewaymodel.GatewayCurrency, "Select Currency"); gatewaymodel.GatewayCountryList = ApplicationUtilities.SetDDLValue(ICB.sproc_get_dropdown_list("030"), gatewaymodel.GatewayCurrency, "Select Country"); return(View(gatewaymodel)); }
public ActionResult ManageGatewayCommission(GatewayProductModel GaPM) { GatewayProductCommon gc = new GatewayProductCommon(); ViewBag.servicelist = ApplicationUtilities.SetDDLValue(ICB.sproc_get_dropdown_list("servicelist", GaPM.GatewayId.DecryptParameter()), GaPM.ProductId, "Select Service"); GaPM.CommissionTypeList = LoadDropdownList("commissiontype") as List <SelectListItem>; gc.ActionUser = Session["username"].ToString(); gc.IpAddress = ApplicationUtilities.GetIP(); ViewBag.CommissionType = LoadDropdownList("commissiontype") as List <SelectListItem>; gc.ProductId = GaPM.ProductId; gc.GatewayId = GaPM.GatewayId.DecryptParameter(); gc.CommissionType = GaPM.CommissionType; gc.CommissionValue = GaPM.CommissionValue; gc.IsProduct = GaPM.IsProduct.DecryptParameter(); if (gc.CommissionType.ToUpper() == "P" && (gc.CommissionValue > 100 || gc.CommissionValue < 0)) { this.ShowPopup(1, "Error"); return(View(GaPM)); } CommonDbResponse dbresp = buss.ManageGatewayProductCommission(gc); if (dbresp.Code == 0) { this.ShowPopup(0, dbresp.Message); return(RedirectToAction("GatewayProductList", new { GatewayID = GaPM.GatewayId })); } this.ShowPopup(1, dbresp.Message); return(View(GaPM)); }
public JsonResult GetDistrictsByProvince(string provinceId) { List <SelectListItem> list = new List <SelectListItem>(); list = ApplicationUtilities.SetDDLValue(LoadDropdownList("districtList", provinceId) as Dictionary <string, string>, ""); return(Json(new SelectList(list, "Value", "Text", JsonRequestBehavior.AllowGet))); }
public ActionResult Manage(string parentid = "", string agentid = "") { SubDistributorModel SDM = new SubDistributorModel(); string username = Session["username"].ToString(); SDM.ParentId = parentid; if (!string.IsNullOrEmpty(agentid.DecryptParameter())) { SubDistributorCommon SDC = ISD.GetSubDistributorById(agentid.DecryptParameter(), username); SDM = SDC.MapObject <SubDistributorModel>(); } ViewBag.PermanentCountryList = ApplicationUtilities.SetDDLValue(LoadDropdownList("country"), SDM.PermanentCountry, "--Permanent Country--"); ViewBag.PermanentProvienceList = ApplicationUtilities.SetDDLValue(LoadDropdownList("province", SDM.PermanentCountry), SDM.PermanentProvince, "--Permanent Provience--"); ViewBag.PermanentDistrictList = ApplicationUtilities.SetDDLValue(LoadDropdownList("districtList", SDM.PermanentProvince) as Dictionary <string, string>, SDM.PermanentDistrict, "--Permanent District--"); ViewBag.PermanentVDC_MuncipilityList = ApplicationUtilities.SetDDLValue(LoadDropdownList("vdc_muncipality", SDM.PermanentDistrict), SDM.PermanentVDC_Muncipality, "--Permanent VDC Muncipality--"); ViewBag.TemporarytCountryList = ApplicationUtilities.SetDDLValue(LoadDropdownList("country"), SDM.TemporaryCountry, "--Temporary Country--"); ViewBag.TemporaryProvienceList = ApplicationUtilities.SetDDLValue(LoadDropdownList("province", SDM.TemporaryCountry), SDM.TemporaryProvince, "--Temporary Provience--"); ViewBag.TemporaryDistrictList = ApplicationUtilities.SetDDLValue(LoadDropdownList("districtList", SDM.TemporaryProvince), SDM.TemporaryDistrict, "--Temporary District--"); ViewBag.TemporaryVDC_MuncipilityList = ApplicationUtilities.SetDDLValue(LoadDropdownList("vdc_muncipality", SDM.TemporaryDistrict), SDM.TemporaryVDC_Muncipality, "--Temporary VDC Muncipality--"); ViewBag.GenderList = ApplicationUtilities.SetDDLValue(LoadDropdownList("gender"), SDM.Gender, "--Select Gender--"); ViewBag.OccupationList = ApplicationUtilities.SetDDLValue(LoadDropdownList("occupation"), SDM.Occupation, "--Select Occupation--"); ViewBag.Nationalitylist = ApplicationUtilities.SetDDLValue(LoadDropdownList("nationality"), SDM.Nationality, "--Select Nationality--"); ViewBag.DoctypeList = ApplicationUtilities.SetDDLValue(LoadDropdownList("doctype"), SDM.Nationality, "--Select Document Type--"); ViewBag.IssueDistrictList = ApplicationUtilities.SetDDLValue(LoadDropdownList("issuedistrict"), SDM.Nationality, "--Select District--"); return(View(SDM)); }
public ActionResult SearchUser(UserCommon UC) { ViewBag.SearchFilter = ApplicationUtilities.SetDDLValue(LoadDropdownList("searchfilter") as Dictionary <string, string>, UC.SearchFilter, "--Select--"); if (!string.IsNullOrEmpty(UC.SearchField) || !string.IsNullOrEmpty(UC.SearchFilter)) { string username = Session["username"].ToString(); var lst = buss.GetSearchUserList(UC.SearchField, UC.SearchFilter, username); foreach (var item in lst) { item.Status = "<span class='badge badge-" + (item.IsActive.Trim().ToUpper() == "Y" ? "success" : "danger") + "'>" + (item.IsActive.Trim().ToUpper() == "Y" ? "Active" : "Blocked") + "</span>"; } IDictionary <string, string> param = new Dictionary <string, string>(); param.Add("AgentUserId", "Agent Id"); param.Add("FullName", "Full Name"); param.Add("UserName", "User Name"); param.Add("Email", "Email"); param.Add("Status", "Status"); param.Add("PhoneNo", "Mobile Number"); param.Add("CreatedBy", "Created By"); param.Add("CreateDate", "Created On"); ProjectGrid.column = param; //Ends var grid = ProjectGrid.MakeGrid(lst, "hidebreadcrumb", "", 10, false, "", "", "", "", "", ""); ViewData["grid"] = grid; } else { this.ShowPopup(1, "Please Fill the fields"); } return(View(UC)); }
public ActionResult ManageCommissionCategoryProduct(CommissionCategoryDetailModel CMC) { ViewBag.productlist = ApplicationUtilities.SetDDLValue(ICB.sproc_get_dropdown_list("servicelist"), CMC.ProductId, "Select Product"); // ViewBag.CommissionPercentType = ApplicationUtilities.SetDDLValue(ICB.sproc_get_dropdown_list("031"), CMC.CommissionPercentType, "Select Percent Type"); CMC.CommissionPercentTypeList = ApplicationUtilities.SetDDLValue(ICB.sproc_get_dropdown_list("031"), CMC.CommissionPercentType, "Select Percent Type"); CMC.CommissionTypeList = LoadDropdownList("commissiontype") as List <SelectListItem>; if (ModelState.IsValid) { CommissionCategoryDetailCommon CDC = new CommissionCategoryDetailCommon(); CDC.CommissionDetailId = CMC.CommissionDetailId.DecryptParameter(); CDC.ProductId = CMC.ProductId; CDC.CommissionCategoryId = CMC.CommissionCategoryId.DecryptParameter(); CDC.CommissionType = CMC.CommissionType; CDC.CommissionPercentType = CMC.CommissionPercentType; CDC.CommissionValue = CMC.CommissionValue; CDC.IpAddress = ApplicationUtilities.GetIP(); CDC.ActionUser = Session["username"].ToString(); if ((CDC.CommissionType != "F" && float.Parse(CDC.CommissionValue) > 100) || (float.Parse(CDC.CommissionValue) < 0)) { this.ShowPopup(1, "Commission Value Mismatch"); return(View(CMC)); } CommonDbResponse dbres = comm.ManageCommissionCategoryProduct(CDC); if (dbres.Code == 0) { this.ShowPopup(0, dbres.Message); return(RedirectToAction("CommissionProductList", new { categoryid = CMC.CommissionCategoryId })); } CMC.Msg = dbres.Message; } this.ShowPopup(1, "Error" + CMC.Msg); return(View(CMC)); }
public ActionResult addUsers(string agentid, string UserId = "") { SubDistributorCommon SDC = new SubDistributorCommon(); if (!string.IsNullOrEmpty(agentid.DecryptParameter())) { if (!string.IsNullOrEmpty(UserId.DecryptParameter())) { SDC = ISD.GetUserById(agentid.DecryptParameter(), UserId.DecryptParameter()); } SDC.UserId = SDC.UserId.EncryptParameter(); SDC.AgentID = SDC.AgentID.EncryptParameter(); SDC.UserStatus = string.IsNullOrEmpty(SDC.UserStatus)?"": SDC.UserStatus.Trim(); SDC.UserType = SDC.UserTypeId + '|' + SDC.UserType; } ViewBag.UserTypeList = ApplicationUtilities.SetDDLValue(LoadDropdownList("usertype"), SDC.UserType, "--Select User Type--"); ViewBag.UserStatusList = ApplicationUtilities.SetDDLValue(LoadDropdownList("status"), SDC.UserStatus, "--Select Status--"); ViewBag.UserIsPrimaryList = ApplicationUtilities.SetDDLValue(LoadDropdownList("isprimary") as Dictionary <string, string>, SDC.isPrimary, "--Is Primary--"); SubDistributorModel SDM = SDC.MapObject <SubDistributorModel>(); return(View(SDM)); }
public ActionResult Manage(AppVersionControlModel AVM) { ViewBag.platform = ApplicationUtilities.SetDDLValue(LoadDropdownList("platform"), "", "--Select Application Platform--"); if (ModelState.IsValid) { if (AVM.IsMajorUpdate.ToUpper() != "Y") { AVM.IsMajorUpdate = "N"; } if (AVM.IsMinorUpdate.ToUpper() != "Y") { AVM.IsMinorUpdate = "N"; } if (AVM.IsMinorUpdate.ToUpper() == "N" && AVM.IsMajorUpdate.ToUpper() == "N") { ModelState.AddModelError("IsMajorUpdate", "Invalid Parameter"); return(View(AVM)); } AppVersionControlCommon AVC = new AppVersionControlCommon(); AVC = AVM.MapObject <AppVersionControlCommon>(); AVC.ActionUser = ApplicationUtilities.GetSessionValue("username").ToString(); AVC.IpAddress = ApplicationUtilities.GetIP(); var dbresp = buss.ManageAppVersion(AVC); if (dbresp.Code == 0) { this.ShowPopup(0, "Successfully Inserted"); return(RedirectToAction("Index")); } } this.ShowPopup(1, "Error"); return(View(AVM)); }
public ActionResult ManageAgentCommissionCategoryProduct(string id) { CommissionCategoryDetailCommon CDC = comm.GetAgentCommissioncategoryProductById(id.DecryptParameter()); CommissionCategoryDetailModel CMC = new CommissionCategoryDetailModel(); string agentid = Session["AgentId"].ToString(); if (CDC != null) { CMC.CommissionDetailId = CDC.CommissionDetailId.EncryptParameter(); CMC.ProductId = CDC.ProductId; CMC.CommissionCategoryId = CDC.CommissionCategoryId.EncryptParameter(); CMC.CommissionType = CDC.CommissionType; CMC.CommissionValue = CDC.CommissionValue; string agentcommCat = comm.GetAdminCommCatagory(agentid).CommissionCategoryId; var admincomm = comm.GetAdminCommvalue(agentcommCat, CDC.ProductId); CMC.AdminCommissionType = admincomm.CommissionType; CMC.AdminCommissionValue = admincomm.CommissionValue; CMC.AdminProductId = admincomm.ProductId; //CMC.CommissionPercentType = CDC.CommissionPercentType.Trim(); } ViewBag.productlist = ApplicationUtilities.SetDDLValue(ICB.sproc_get_dropdown_list("servicelist"), CMC.ProductId, "Select Product"); CMC.CommissionPercentTypeList = ApplicationUtilities.SetDDLValue(ICB.sproc_get_dropdown_list("031"), CMC.CommissionPercentType, "Select Percent Type"); CMC.CommissionTypeList = LoadDropdownList("commissiontype") as List <SelectListItem>; return(View(CMC)); }
public ActionResult ManageServices(string id = "") { ServicesCommon servicesCommon = new ServicesCommon(); var productid = id.DecryptParameter(); if (!String.IsNullOrEmpty(productid)) { //return RedirectToAction("Index"); servicesCommon = _services.GetServicesByProductId(Int32.Parse(productid)); servicesCommon.ProductId = servicesCommon.ProductId.EncryptParameter(); } servicesCommon.StatusList = LoadDropdownList("status") as List <SelectListItem>; servicesCommon.CompanyList = ApplicationUtilities.SetDDLValue(LoadDropdownList("company") as Dictionary <string, string>, servicesCommon.Company, "Select Company"); servicesCommon.TransactionTypeList = ApplicationUtilities.SetDDLValue(LoadDropdownList("txntype") as Dictionary <string, string>, servicesCommon.TransactionType, "Select Transaction Type"); servicesCommon.ProductTypeList = ApplicationUtilities.SetDDLValue(LoadDropdownList("producttype") as Dictionary <string, string>, servicesCommon.ProductType, "Select Product Type"); servicesCommon.ProductCategoryList = ApplicationUtilities.SetDDLValue(LoadDropdownList("productcategory") as Dictionary <string, string>, servicesCommon.ProductCategory, "Select Product Category"); servicesCommon.PrimaryGatewayList = ApplicationUtilities.SetDDLValue(LoadDropdownList("primarygateway") as Dictionary <string, string>, servicesCommon.PrimaryGateway, "Select Primary Gateway"); servicesCommon.SecondaryGatewayList = ApplicationUtilities.SetDDLValue(LoadDropdownList("secondarygateway") as Dictionary <string, string>, servicesCommon.SecondaryGateway, "Select Secondary Gateway"); ServicesModel lst = servicesCommon.MapObject <ServicesModel>(); return(View(lst)); }
public ActionResult ManageGatewayCommission(string Id, string pid = "") { string GatewayId = Id; GatewayProductModel GPM = new GatewayProductModel(); GPM.GatewayId = GatewayId; GPM.ProductId = pid;//.DecryptParameter(); string AvailableProduct = "N"; GPM.IsProduct = AvailableProduct.EncryptParameter(); if ((!string.IsNullOrEmpty(pid)) && (!string.IsNullOrEmpty(pid.DecryptParameter()))) { var list = buss.GetGatewayProductList(GPM.GatewayId.DecryptParameter(), GPM.ProductId.DecryptParameter()); if (list != null) { AvailableProduct = "Y"; GPM.IsProduct = AvailableProduct.EncryptParameter(); GPM.ProductId = list[0].ProductId.ToString(); GPM.GatewayId = list[0].GatewayId.ToString().EncryptParameter(); GPM.CommissionType = list[0].CommissionType.ToString(); GPM.CommissionValue = (float)list[0].CommissionValue; } } ViewBag.servicelist = ApplicationUtilities.SetDDLValue(ICB.sproc_get_dropdown_list("servicelist", GPM.GatewayId.DecryptParameter()), GPM.ProductId, "Select Service"); GPM.CommissionTypeList = LoadDropdownList("commissiontype") as List <SelectListItem>; return(View(GPM)); }
public async System.Threading.Tasks.Task <JsonResult> GetTRCards(string cardType, string checkboxtype) { List <SelectListItem> list = new List <SelectListItem>(); string userid = Session["UserId"].ToString(); var cardsList = _card.GetCardList(userid).MapObjects <CardModel>(); //var cardType = _card.GetCardType(); Dictionary <string, string> cardNo = new Dictionary <string, string>(); if (checkboxtype.ToLower() == "tr") { foreach (var item in cardsList.Where(x => x.CardType == cardType).Where(x => x.Status.ToUpper() == "Y").Where(x => x.IsReceived.ToUpper() != "Y")) { string trcardlastfour = "************" + item.CardNo.Substring(12, 4); cardNo.Add(item.CardId, trcardlastfour); } } if (checkboxtype.ToLower() == "re") { foreach (var item in cardsList.Where(x => x.CardType == cardType).Where(x => x.Status.ToUpper() == "Y").Where(x => x.IsReceived.ToUpper() == "Y")) { string recardlastfour = "************" + item.CardNo.Substring(12, 4); cardNo.Add(item.CardId, recardlastfour); } } list = ApplicationUtilities.SetDDLValue(cardNo, ""); return(Json(new SelectList(list, "Value", "Text", JsonRequestBehavior.AllowGet))); }
public async System.Threading.Tasks.Task <JsonResult> GetLocalbodyByDistrict(string DistrictId) { List <SelectListItem> list = new List <SelectListItem>(); list = ApplicationUtilities.SetDDLValue(LoadDropdownList("localbodyList", DistrictId) as Dictionary <string, string>, ""); return(Json(new SelectList(list, "Value", "Text", JsonRequestBehavior.AllowGet))); }
// GET: Client/WalletBalance public ActionResult balanceTransfer() { WalletBalanceModel walletBalance = new WalletBalanceModel(); Dictionary <string, string> PurposeList = _walletUser.GetProposeList(); walletBalance.PurposeList = ApplicationUtilities.SetDDLValue(PurposeList, "", "--Propose--"); return(View(walletBalance)); }
public ActionResult NwscBillInquiry(NwscBillInquiryModel nwsc) { NwscBillInquiryCommon nbc = nwsc.MapObject <NwscBillInquiryCommon>(); ViewBag.branchlist = ApplicationUtilities.SetDDLValue(Denomination("34"), "", "--Select Office--"); var productdetails = GetNWSCproductDetails(); nwsc.ProductLogo = productdetails.ProductLogo; nbc.IpAddress = ApplicationUtilities.GetIP(); nbc.UserId = ApplicationUtilities.GetSessionValue("userid").ToString(); var inquiry = _nwsc.GetNwscBill(nbc); NwscBillInquiryResponseModel nwspbillresp = new NwscBillInquiryResponseModel(); if (inquiry.GatewayName.ToUpper() == "PRABHUPAY") { if (inquiry.Code == shared.Models.ResponseCode.Success) { var obj = Newtonsoft.Json.JsonConvert.SerializeObject(inquiry.Data); var prabhupayinqresp = Newtonsoft.Json.JsonConvert.DeserializeObject <PrabhuPayNwscBillInquiryResponseModel>(obj); nwspbillresp.CustomerId = prabhupayinqresp.CustomerId; nwspbillresp.CustomerName = prabhupayinqresp.CustomerName; nwspbillresp.Area = prabhupayinqresp.Area; nwspbillresp.Lagat = prabhupayinqresp.Lagat; nwspbillresp.OfficeCode = prabhupayinqresp.OfficeCode; nwspbillresp.Office = prabhupayinqresp.Office; nwspbillresp.TotalDueAmount = prabhupayinqresp.TotalDueAmount; nwspbillresp.TotalServiceCharge = prabhupayinqresp.TotalServiceCharge; List <NwscBillInquiryDetailModel> lst = new List <NwscBillInquiryDetailModel>(); foreach (var item in prabhupayinqresp.BillDetail) { NwscBillInquiryDetailModel bill = new NwscBillInquiryDetailModel() { BillFrom = item.BillFrom, BillTo = item.BillTo, BillAmount = item.BillAmount, FineAmount = item.FineAmount, MeterRent = item.MeterRent, DiscountAmount = item.DiscountAmount, PayableAmount = item.PayableAmount, }; lst.Add(bill); } nwspbillresp.BillDetail = lst; nwspbillresp.EncryptedContent = (prabhupayinqresp.TotalDueAmount + prabhupayinqresp.TotalServiceCharge + prabhupayinqresp.CustomerId + prabhupayinqresp.OfficeCode).EncryptParameter(); return(View("NwscBillPayment", nwspbillresp)); } else { this.ShowPopup(1, inquiry.Message); return(View(nwsc)); } } this.ShowPopup(1, "Service Unavaliable"); return(View(nwsc)); }
public ActionResult RequestCard(CardModel cardModels) { int ReqAmount = 0; float AvaBalnce = 0; cardModels.Balance = Session["Balance"].ToString(); //CardModel cardModel = new CardModel(); var cardType = _card.GetCardType(); foreach (var item in cardType.Where(kvp => kvp.Value.ToUpper() == "VIRTUAL CARD").ToList()) { cardType.Remove(item.Key); } cardModels.CardTypeList = ApplicationUtilities.SetDDLValue(cardType as Dictionary <string, string>, "", "--Card Type--"); if (int.TryParse(cardModels.Amount, out ReqAmount)) { if (ReqAmount < 100) //|| ReqAmount>1000 { ModelState.AddModelError("Amount", "Amount should be at least RS. 100"); return(View(cardModels)); } } else { ModelState.AddModelError("Amount", "Invalid Requested amount."); return(View(cardModels)); } if (float.TryParse(cardModels.Balance, out AvaBalnce)) { if (ReqAmount > AvaBalnce) { ModelState.AddModelError("Amount", "Requested amount greater then balance"); return(View(cardModels)); } } cardModels.UserId = Session["UserId"].ToString(); cardModels.AgentId = Session["AgentId"].ToString(); cardModels.UserName = Session["UserName"].ToString(); //cardModels.UserName = Session["FullName"].ToString(); WalletUserInfo walletUser = _walletUserBusiness.UserInfo(cardModels.UserId); cardModels.Email = walletUser.Email; cardModels.MobileNo = walletUser.MobileNo; cardModels.ActionUser = cardModels.UserName; cardModels.CreatedIp = ApplicationUtilities.GetIP(); CardCommon cardCommon = cardModels.MapObject <CardCommon>(); //CommonDbResponse dbResponse = _card.CardApproval(cardCommon); CommonDbResponse dbResponse = _card.RequestCard(cardCommon); if (dbResponse.Code == 0) { //dbResponse.SetMessageInTempData(this, "Index"); return(RedirectToAction("Index")); } dbResponse.SetMessageInTempData(this, "Index"); return(View(cardModels)); }
public void LoadDropDownList(KYCModel kycModel) { switch (kycModel.PProvince != null ? kycModel.PProvince.ToLower() : "") { case "province no. 1": kycModel.PProvince = "1"; break; case "province no. 2": kycModel.PProvince = "2"; break; case "bagmati pradesh": kycModel.PProvince = "3"; break; case "gandaki pradesh": kycModel.PProvince = "4"; break; } switch (kycModel.TProvince != null ? kycModel.TProvince.ToLower() : "") { case "province no. 1": kycModel.TProvince = "1"; break; case "province no. 2": kycModel.TProvince = "2"; break; case "bagmati pradesh": kycModel.TProvince = "3"; break; case "gandaki pradesh": kycModel.TProvince = "4"; break; } ViewBag.CountryList = ApplicationUtilities.SetDDLValue(LoadDropdownList("country") as Dictionary <string, string>, kycModel.Country, "--Country--"); ViewBag.GenderList = ApplicationUtilities.SetDDLValue(LoadDropdownList("gender") as Dictionary <string, string>, kycModel.Gender, "--Gender--"); ViewBag.OccupationList = ApplicationUtilities.SetDDLValue(LoadDropdownList("occupation") as Dictionary <string, string>, kycModel.Occupation, "--Occupation--"); ViewBag.MaritalStatusList = ApplicationUtilities.SetDDLValue(LoadDropdownList("maritalstatus") as Dictionary <string, string>, kycModel.MaritalStatus, "--Marital Status--"); ViewBag.RemarksList = ApplicationUtilities.SetDDLValue(LoadDropdownList("remarks") as Dictionary <string, string>, kycModel.Remarks, "--Remarks--"); ViewBag.DocTypeList = ApplicationUtilities.SetDDLValue(LoadDropdownList("doctype") as Dictionary <string, string>, kycModel.Id_type, "--Document Type--"); ViewBag.PProvinceList = ApplicationUtilities.SetDDLValue(LoadDropdownList("province") as Dictionary <string, string>, kycModel.PProvince, "--Permanent Province--"); ViewBag.TProvinceList = ApplicationUtilities.SetDDLValue(LoadDropdownList("province") as Dictionary <string, string>, kycModel.TProvince, "--Temporary Province--"); ViewBag.PDistrictList = ApplicationUtilities.SetDDLValue(LoadDropdownList("districtList", kycModel.PProvince) as Dictionary <string, string>, kycModel.PDistrict, "--Permanent District--"); ViewBag.TDistrictList = ApplicationUtilities.SetDDLValue(LoadDropdownList("districtList", kycModel.TProvince) as Dictionary <string, string>, kycModel.TDistrict, "--Temporary District--"); ViewBag.PMunicipalityList = ApplicationUtilities.SetDDLValue(LoadDropdownList("localbodyList", (String.IsNullOrEmpty(kycModel.PDistrict) ? "" : kycModel.PDistrict)) as Dictionary <string, string>, kycModel.PLocalBody, "--Permanent Municipality--"); ViewBag.TMunicipalityList = ApplicationUtilities.SetDDLValue(LoadDropdownList("localbodyList", (String.IsNullOrEmpty(kycModel.TDistrict) ? "" : kycModel.TDistrict)) as Dictionary <string, string>, kycModel.TLocalBody, "--Temporary Municipality--"); ViewBag.NationalityList = ApplicationUtilities.SetDDLValue(LoadDropdownList("nationality") as Dictionary <string, string>, kycModel.Nationality, "--Nationality--"); ViewBag.OtherRemarks = !String.IsNullOrEmpty(kycModel.Remarks) ? (kycModel.Remarks.Contains("Others::") ? kycModel.Remarks.Replace("Others::", "") : "") : ""; ViewBag.Id_IssuedPlaceList = ApplicationUtilities.SetDDLValue(LoadDropdownList("districtList") as Dictionary <string, string>, kycModel.Id_IssuedPlace, "--Issue Place--"); ViewBag.SpouseName = kycModel.SpouseName; ViewBag.ExpireDateAD = kycModel.Id_ExpiryDateAD; ViewBag.ExpireDateBS = kycModel.Id_ExpiryDateBS; }
public ActionResult Manage(MobileNotificationModel mnm, HttpPostedFileBase Image_Upload) { var ImagePath = ""; ViewBag.importancelevel = ApplicationUtilities.SetDDLValue(LoadDropdownList("importance"), "", "--select Importance Level--"); if (ModelState.IsValid) { MobileNotificationCommon mnc = new MobileNotificationCommon(); mnc = mnm.MapObject <MobileNotificationCommon>(); if (!string.IsNullOrEmpty(mnc.NotificationId)) { if (string.IsNullOrEmpty(mnc.NotificationId.DecryptParameter())) { return(View("Manage", mnm)); } mnc.NotificationId = mnc.NotificationId.DecryptParameter(); } if (Image_Upload != null) { var contentType = Image_Upload.ContentType; var allowedExtensions = new[] { ".jpg", ".png", ".jpeg" }; var fileName = Path.GetFileName(Image_Upload.FileName); String timeStamp = DateTime.Now.ToString(); var ext = Path.GetExtension(Image_Upload.FileName); if (Image_Upload.ContentLength > 1 * 1024 * 1024)//1 MB { this.ShowPopup(1, "Image Size must be less than 1MB"); return(View(mnm)); } if (allowedExtensions.Contains(ext.ToLower())) { string datet = DateTime.Now.ToString().Replace('/', ' ').Replace(':', ' '); string myfilename = "logo " + datet + ext.ToLower(); ImagePath = Path.Combine(Server.MapPath("~/Content/userupload/Notification"), myfilename); mnc.ImageUpload = "/Content/userupload/Notification/" + myfilename; } else { this.ShowPopup(1, "File Must be .jpg,.png,.jpeg"); return(View(mnm)); } } mnc.ActionUser = ApplicationUtilities.GetSessionValue("username").ToString(); var dbresp = buss.ManageNotification(mnc); if (dbresp.Code == 0) { if (Image_Upload != null) { Image_Upload.SaveAs(ImagePath); } this.ShowPopup(0, "successfully Inserted"); return(RedirectToAction("Index")); } } this.ShowPopup(1, "Error"); return(View(mnm)); }
public ActionResult Manage(string id) { AppVersionControlModel mnm = new AppVersionControlModel(); string username = ApplicationUtilities.GetSessionValue("username").ToString(); ViewBag.platform = ApplicationUtilities.SetDDLValue(LoadDropdownList("platform"), "", "--Select Application Platform--"); return(View()); }
public ActionResult AgentRT(BalanceModel balanceModel) { //BalanceModel balanceModel = new BalanceModel(); List <BalanceCommon> balanceCommons = _balance.GetAgentName(); Dictionary <string, string> agentName = new Dictionary <string, string>(); Dictionary <string, string> bankList = _balance.GetBankList(); foreach (BalanceCommon bcommon in balanceCommons) { agentName.Add(bcommon.AgentId, bcommon.Name); } balanceModel.NameList = ApplicationUtilities.SetDDLValue(agentName, "", "--Agent--"); balanceModel.BankAccountList = ApplicationUtilities.SetDDLValue(bankList, "", "--Bank--"); if (Convert.ToDecimal(balanceModel.Amount) > 500000 && balanceModel.Type == "T") { ModelState.AddModelError("Amount", "Amount Cannot Be Greater then 500000 (5 Lakhs)"); return(View(balanceModel)); } if (balanceModel.Type == "R") { ModelState.Remove(("BankId")); if (Convert.ToDecimal(balanceModel.Amount) > 100000 && balanceModel.Type == "R") { ModelState.AddModelError("Amount", "Amount Cannot Be Greater then 100000 (1 Lakh)"); return(View(balanceModel)); } } if (ModelState.IsValid) { balanceModel.CreatedBy = Session["UserName"].ToString(); balanceModel.AgentId = agentName.FirstOrDefault(x => x.Key == balanceModel.Name).Key.ToString(); balanceModel.Name = agentName.FirstOrDefault(x => x.Key == balanceModel.Name).Value.ToString(); if (balanceModel.Type == "T") { balanceModel.BankName = bankList.FirstOrDefault(x => x.Key == balanceModel.BankId).Value.ToString(); } balanceModel.CreatedIp = ApplicationUtilities.GetIP(); BalanceCommon balanceCommon = balanceModel.MapObject <BalanceCommon>(); CommonDbResponse dbResponse = _balance.AgentTR(balanceCommon); if (dbResponse.Code == 0) { dbResponse.SetMessageInTempData(this); return(RedirectToAction("AgentRT", ControllerName)); } } else { return(View(balanceModel)); } return(RedirectToAction("AgentRT", ControllerName)); }
public ActionResult balanceTransfer(WalletBalanceModel walletBalance) { Dictionary <string, string> PurposeList = _walletUser.GetProposeList(); walletBalance.PurposeList = ApplicationUtilities.SetDDLValue(PurposeList, "", "--Propose--"); if ((Convert.ToDecimal(walletBalance.Amount) > 1000 || Convert.ToDecimal(walletBalance.Amount) < 10) && walletBalance.Type == "T") { ModelState.AddModelError("Amount", "Amount should be between 10-1000"); return(View(walletBalance)); } if (walletBalance.Type == "R") { ModelState.Remove(("Propose")); if ((Convert.ToDecimal(walletBalance.Amount) > 1000 || Convert.ToDecimal(walletBalance.Amount) < 10)) { ModelState.AddModelError("Amount", "Amount should be between 10-1000"); return(View(walletBalance)); } } string usertype = Session["UserType"].ToString(); string agentid = Session["AgentId"].ToString(); CommonDbResponse response = _walletUser.CheckMobileNumber(agentid, walletBalance.ReceiverAgentId, usertype, "tb"); if (response.Code != 0) { ModelState.AddModelError("ReceiverAgentId", "Invalid User Detail"); return(View(walletBalance)); } else { ModelState.Remove("ReceiverAgentId"); } if (ModelState.IsValid) { //walletBalance.AgentId = Session["AgentId"].ToString(); walletBalance.ActionUser = Session["UserName"].ToString(); walletBalance.IpAddress = ApplicationUtilities.GetIP(); WalletBalanceCommon walletBalanceCommon = walletBalance.MapObject <WalletBalanceCommon>(); CommonDbResponse dbResponse = _walletUser.WalletBalanceRT(walletBalanceCommon); if (dbResponse.Code == 0) { dbResponse.SetMessageInTempData(this, "balanceTransfer"); return(RedirectToAction("balanceTransfer", ControllerName)); } dbResponse.SetMessageInTempData(this, "balanceTransfer"); return(RedirectToAction("balanceTransfer")); } else { return(View(walletBalance)); } return(RedirectToAction("balanceTransfer")); }
public void LoadDropDownList(AgentNewModel agentmodel) { //Manage Distributor ViewBag.AgentCountryList = ApplicationUtilities.SetDDLValue(LoadDropdownList("country"), agentmodel.AgentCountry, "--select Country--"); ViewBag.AgentProvienceList = ApplicationUtilities.SetDDLValue(LoadDropdownList("province", agentmodel.AgentCountry), agentmodel.AgentProvince, "--select Provience--"); ViewBag.AgentDistrictList = ApplicationUtilities.SetDDLValue(LoadDropdownList("districtList", agentmodel.AgentProvince) as Dictionary <string, string>, agentmodel.AgentDistrict, "--select District--"); ViewBag.AgentVDC_MuncipilityList = ApplicationUtilities.SetDDLValue(LoadDropdownList("vdc_muncipality", agentmodel.AgentDistrict), agentmodel.AgentVDC_Muncipality, "--select VDC Muncipality--"); ViewBag.IssueDistrictList = ApplicationUtilities.SetDDLValue(LoadDropdownList("issuedistrict"), agentmodel.ContactPersonIdIssueDistrict, "--Select District--"); ViewBag.DoctypeList = ApplicationUtilities.SetDDLValue(LoadDropdownList("doctype"), agentmodel.ContactPersonIdType, "--Select Document Type--"); }