internal int IUD(BOFinanceConfig _bofncfg) { int returnvalue = default(int); using (SqlConnection _sqlconnection = ConnectionInfo.GetConnection()) { _sqlcommand = new SqlCommand(); _sqlcommand.CommandText = "SP_IUDFinanceConfig"; _sqlcommand.CommandType = CommandType.StoredProcedure; _sqlcommand.Connection = _sqlconnection; _sqlconnection.Open(); _sqlcommand.Parameters.AddWithValue("@FinanceConfigId", _bofncfg.FinanceConfigId); _sqlcommand.Parameters.AddWithValue("@PaymentOptionId", _bofncfg.PaymentOptionId); _sqlcommand.Parameters.AddWithValue("@MerchantId", _bofncfg.MerchantId); _sqlcommand.Parameters.AddWithValue("@AccountEmail", _bofncfg.AccountEmail); _sqlcommand.Parameters.AddWithValue("@FirstName", _bofncfg.FirstName); _sqlcommand.Parameters.AddWithValue("@LastName", _bofncfg.LastName); _sqlcommand.Parameters.AddWithValue("@Country", _bofncfg.Country); _sqlcommand.Parameters.AddWithValue("@City", _bofncfg.City); _sqlcommand.Parameters.AddWithValue("@BankOfName", _bofncfg.BankOfName); _sqlcommand.Parameters.AddWithValue("@SwiftCode", _bofncfg.SwiftCode); _sqlcommand.Parameters.AddWithValue("@IsActive", _bofncfg.IsActive); _sqlcommand.Parameters.AddWithValue("@IsDelete", _bofncfg.IsDelete); _sqlcommand.Parameters.AddWithValue("@CreatedBy", _bofncfg.CreatedBy); _sqlcommand.Parameters.AddWithValue("@CreatedDate", _bofncfg.CreatedDate); _sqlcommand.Parameters.AddWithValue("@UpdatedBy", _bofncfg.UpdatedBy); _sqlcommand.Parameters.AddWithValue("UpdatedDate", _bofncfg.UpdatedDate); _sqlcommand.Parameters.AddWithValue("@Event", _bofncfg.Event); _sqlcommand.Parameters.AddWithValue("@returnValue", 0).Direction = ParameterDirection.InputOutput; try { _sqlcommand.ExecuteNonQuery(); returnvalue = Convert.ToInt32(_sqlcommand.Parameters["@returnValue"].Value); } catch (SqlException sqlex) { Common.LogError(sqlex); } catch (StackOverflowException stackex) { Common.LogError(stackex); } catch (Exception ex) { Common.LogError(ex); } finally { _sqlconnection.Close(); _sqlcommand.Dispose(); } } return(returnvalue); }
internal List <BOFinanceConfig> SelectFinancConfigList(BOFinanceConfig _bofcnfg) { SqlCommand _sqlcommand; SqlDataAdapter _sqldataadapter; using (SqlConnection _sqlcon = ConnectionInfo.GetConnection()) { _sqlcommand = new SqlCommand(); _sqlcommand.CommandText = "SP_GetFinanceConfig"; _sqlcommand.CommandType = CommandType.StoredProcedure; _sqlcommand.Connection = _sqlcon; _sqlcon.Open(); _sqlcommand.Parameters.AddWithValue("@MerchantId", _bofcnfg.MerchantId); _sqlcommand.Parameters.AddWithValue("@Event", _bofcnfg.Event); _sqldataadapter = new SqlDataAdapter(_sqlcommand); DataTable _datatable = new DataTable(); _sqldataadapter.Fill(_datatable); List <BOFinanceConfig> _bofincnfglist = (from li in _datatable.AsEnumerable() select new BOFinanceConfig { FinanceConfigId = li.Field <int>("FinanceConfigId"), PaymentOptionId = li.Field <int>("PaymentOptionId"), PaymentOption = li.Field <string>("PaymentOption"), MerchantId = li.Field <int>("MerchantId"), AccountEmail = li.Field <string>("AccountEmail"), FirstName = li.Field <string>("FirstName"), LastName = li.Field <string>("LastName"), Country = li.Field <string>("Country"), City = li.Field <string>("City"), BankOfName = li.Field <string>("BankOfName"), SwiftCode = li.Field <string>("SwiftCode") }).ToList(); return(_bofincnfglist); } }
internal int Insert(BOFinanceConfig _bofncfg) { return(_dafncfg.IUD(_bofncfg)); }
internal int Update(BOFinanceConfig _bofncfg) { return(_dafncfg.IUD(_bofncfg)); }
internal List <BOFinanceConfig> SelectFinanceConfigList(BOFinanceConfig _bofcnfg) { return(_dafcnfg.SelectFinancConfigList(_bofcnfg)); }
internal int Update(BOFinanceConfig _bofcnfg) { return(_dafcnfg.IUDFinanceConfig(_bofcnfg)); }
internal int Insert(BOFinanceConfig _bofcnfg) { return(_dafcnfg.IUDFinanceConfig(_bofcnfg)); }