public void ManageGatewayBalance(GatewayBalanceModel model) { if (ModelState.IsValid) { GatewayBalanceCommon common = new GatewayBalanceCommon(); common.Gatewayid = model.Gatewayid.DecryptParameter(); common.BalanceToBeAdd = Math.Abs(model.BalanceToBeAdd); common.ActionUser = Session["UserName"].ToString(); common.IpAddress = ApplicationUtilities.GetIP(); common.Remarks = model.Remarks; CommonDbResponse dbresp = buss.updatebalance(common); if (dbresp.Code == 0) { this.ShowPopup(0, "Succesfully Added"); return; //dbresp.SetMessageInTempData(this); //return ("1"); // return RedirectToAction("Detail"); } } else { this.ShowPopup(1, "Amount Not Added"); } }
public CommonDbResponse updatebalance(GatewayBalanceCommon bc) { var sql = "Exec sproc_gateway_detail "; sql += "@flag ='ub'"; sql += ", @gateway_id=" + dao.FilterString(bc.Gatewayid); sql += ", @gateway_balance=" + dao.FilterString(bc.BalanceToBeAdd.ToString()); sql += ", @remarks=" + dao.FilterString(bc.Remarks); sql += ", @action_user="******", @from_ip_address=" + dao.FilterString(bc.IpAddress); return(dao.ParseCommonDbResponse(sql)); }
public List <GatewayBalanceCommon> GetGatewayReportList() { var sql = "sproc_gateway_detail @flag = 'r'"; var dt = dao.ExecuteDataTable(sql); var list = new List <GatewayBalanceCommon>(); if (null != dt) { foreach (DataRow item in dt.Rows) { GatewayBalanceCommon common = new GatewayBalanceCommon(); common.Gatewayid = item["gateway_id"].ToString(); common.GatewayName = item["gateway_name"].ToString(); common.GatewayStatus = item["balance_type"].ToString(); common.AvaliableBalance = float.Parse(item["amount"].ToString()); common.BalanceToBeAdd = float.Parse(item["updated_balance"].ToString()); common.GatewayCurrency = item["currency_code"].ToString(); common.CreatedBy = item["created_by"].ToString(); common.Remarks = item["admin_remarks"].ToString(); list.Add(common); } } return(list); }
public CommonDbResponse updatebalance(GatewayBalanceCommon bc) { return(repo.updatebalance(bc)); }