예제 #1
0
        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);
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
 internal int Insert(BOFinanceConfig _bofncfg)
 {
     return(_dafncfg.IUD(_bofncfg));
 }
예제 #4
0
 internal int Update(BOFinanceConfig _bofncfg)
 {
     return(_dafncfg.IUD(_bofncfg));
 }
예제 #5
0
 internal List <BOFinanceConfig> SelectFinanceConfigList(BOFinanceConfig _bofcnfg)
 {
     return(_dafcnfg.SelectFinancConfigList(_bofcnfg));
 }
예제 #6
0
 internal int Update(BOFinanceConfig _bofcnfg)
 {
     return(_dafcnfg.IUDFinanceConfig(_bofcnfg));
 }
예제 #7
0
 internal int Insert(BOFinanceConfig _bofcnfg)
 {
     return(_dafcnfg.IUDFinanceConfig(_bofcnfg));
 }