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 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)); }