public ActionResult AddBank(BankCommon bc) { if (ModelState.IsValid) { if (bc.BankID == null) { string username = Session["Username"].ToString(); bc.ActionUser = username; string hostname = Dns.GetHostName(); bc.IpAddress = Dns.GetHostByName(hostname).AddressList[0].ToString(); _bank.AddBank(bc); } else { string bid = bc.BankID; bc.BankID = bid.DecryptParameter(); string username = Session["Username"].ToString(); bc.ActionUser = username; string hostname = Dns.GetHostName(); bc.IpAddress = Dns.GetHostByName(hostname).AddressList[0].ToString(); _bank.UpdateBank(bc); } } return(RedirectToAction("Detail")); }
public List <BankCommon> GetBankList() { List <BankCommon> bankList = new List <BankCommon>(); string sqlCommand = "Execute sproc_funding_bank_detail "; sqlCommand += "@flag = 'S'"; DataTable bankDt = repo.ExecuteDataTable(sqlCommand); if (bankDt != null) { foreach (DataRow row in bankDt.Rows) { BankCommon b = new BankCommon(); b.BankID = row["funding_bank_id"].ToString(); b.BankName = row["funding_bank_name"].ToString(); b.BankAccountNo = row["funding_account_number"].ToString(); b.BankBranch = row["funding_bank_branch"].ToString(); b.BankStatus = row["bank_status"].ToString(); b.BankCreatedBy = row["created_by"].ToString(); b.CreatedDate = Convert.ToDateTime(row["created_local_date"]); bankList.Add(b); } } return(bankList); }
public CommonDbResponse AddBank(BankCommon bank) { string sqlCommand = "Execute sproc_funding_bank_detail "; sqlCommand += "@flag = 'i' ,"; sqlCommand += "@funding_bank_name = '" + bank.BankName + "' ,"; sqlCommand += "@funding_bank_branch = '" + bank.BankBranch + "' ,"; sqlCommand += "@funding_account_number = '" + bank.BankAccountNo + "' ,"; sqlCommand += "@funding_bank_status = '" + bank.BankStatus + "' ,"; sqlCommand += "@action_user = '******' ,"; sqlCommand += "@from_ip_address = '" + bank.IpAddress + "'"; return(repo.ParseCommonDbResponse(sqlCommand)); }
public ActionResult AddBank(string bankID) { BankCommon bankDetail = new BankCommon(); string hostname = Dns.GetHostName(); string myIP = Dns.GetHostByName(hostname).AddressList[0].ToString(); var bankList = _bank.GetBankList(); if (bankID != null) { string bID = bankID.DecryptParameter(); bankDetail = bankList.FirstOrDefault(id => id.BankID == bID); } return(View(bankDetail)); }
public CommonDbResponse UpdateBank(BankCommon bank) { return(repo.UpdateBank(bank)); }
public CommonDbResponse AddBank(BankCommon bank) { return(repo.AddBank(bank)); }