예제 #1
0
        public List <BOWithDrawManage> SelectWithDrawManageList(BOWithDrawManage _bowdwmng)
        {
            SqlCommand     _sqlcommand;
            SqlDataAdapter _sqldataadpater;

            using (SqlConnection _sqlcon = ConnectionInfo.GetConnection())
            {
                _sqlcommand             = new SqlCommand();
                _sqlcommand.CommandText = "SP_GetWithDrawOrder";
                _sqlcommand.CommandType = CommandType.StoredProcedure;
                _sqlcommand.Connection  = _sqlcon;

                _sqlcon.Open();
                _sqlcommand.Parameters.AddWithValue("@Event", _bowdwmng.Event);
                DataTable _datatable = new DataTable();
                _sqldataadpater = new SqlDataAdapter(_sqlcommand);
                _sqldataadpater.Fill(_datatable);

                List <BOWithDrawManage> _bowdrmng = (from li in _datatable.AsEnumerable()
                                                     select new BOWithDrawManage
                {
                    WithDrawOrderId = li.Field <int>("WithDrawOrderId"),
                    WithDrawOrderNo = li.Field <string>("WithDrawOrderNo"),
                    Amount = li.Field <decimal>("Amount"),
                    MerchantName = li.Field <String>("MerchantName"),
                    OrderStatus = li.Field <bool>("OrderStatus")
                }).ToList();
                _sqlcon.Close();
                return(_bowdrmng);
            }
        }
예제 #2
0
        internal int IUD_BoWithDrawManage(BOWithDrawManage _bowmng)
        {
            int        returnValue = default(int);
            SqlCommand _sqlcommnd;

            using (SqlConnection _sqlconnection = ConnectionInfo.GetConnection())
            {
                _sqlcommnd             = new SqlCommand();
                _sqlcommnd.Connection  = _sqlconnection;
                _sqlcommnd.CommandText = "SP_IUDWithDrawOrderManage";
                _sqlcommnd.CommandType = CommandType.StoredProcedure;
                _sqlconnection.Open();

                _sqlcommnd.Parameters.AddWithValue("@WithDrawOrderNo", _bowmng.WithDrawOrderNo);
                _sqlcommnd.Parameters.AddWithValue("@Amount", _bowmng.Amount);
                _sqlcommnd.Parameters.AddWithValue("@MerchantId", _bowmng.MerchantId);
                _sqlcommnd.Parameters.AddWithValue("@OrderStatus", _bowmng.OrderStatus);
                _sqlcommnd.Parameters.AddWithValue("@OrderDate", _bowmng.OrderDate);
                _sqlcommnd.Parameters.AddWithValue("@IsActive", _bowmng.IsActive);
                _sqlcommnd.Parameters.AddWithValue("@IsDelete", _bowmng.IsDelete);
                _sqlcommnd.Parameters.AddWithValue("@CreatedBy", _bowmng.CreatedBy);
                _sqlcommnd.Parameters.AddWithValue("@CreatedDate", _bowmng.CreatedDate);
                _sqlcommnd.Parameters.AddWithValue("@UpdatedBy", _bowmng.UpdatedBy);
                _sqlcommnd.Parameters.AddWithValue("@UpdatedDate", _bowmng.UpdatedDate);
                _sqlcommnd.Parameters.AddWithValue("@Event", _bowmng.Event);
                _sqlcommnd.Parameters.AddWithValue("@returnValue", 0).Direction = System.Data.ParameterDirection.InputOutput;

                try
                {
                    _sqlcommnd.ExecuteNonQuery();
                    returnValue = Convert.ToInt32(_sqlcommnd.Parameters["@returnValue"].Value);
                }
                catch (Exception ex)
                {
                    returnValue = 100;
                }
                finally
                {
                    _sqlconnection.Close();
                    _sqlcommnd.Dispose();
                }
            }
            return(returnValue);
        }
예제 #3
0
        public int IUDWithDrawManage(BOWithDrawManage _bowdwmng)
        {
            int        returnvalue = default(int);
            SqlCommand _sqlcommand;

            using (SqlConnection _sqlcon = ConnectionInfo.GetConnection())
            {
                _sqlcommand             = new SqlCommand();
                _sqlcommand.CommandText = "SP_IUDWithDrawOrderManage";
                _sqlcommand.CommandType = CommandType.StoredProcedure;
                _sqlcommand.Connection  = _sqlcon;
                _sqlcon.Open();

                _sqlcommand.Parameters.AddWithValue("@WithDrawOrderId", _bowdwmng.WithDrawOrderId);
                _sqlcommand.Parameters.AddWithValue("@OrderStatus", _bowdwmng.OrderStatus);
                _sqlcommand.Parameters.AddWithValue("@UpdatedBy", _bowdwmng.UpdatedBy);
                _sqlcommand.Parameters.AddWithValue("@UpdatedDate", _bowdwmng.UpdatedDate);
                _sqlcommand.Parameters.AddWithValue("@Event", _bowdwmng.Event);
                _sqlcommand.Parameters.AddWithValue("@returnValue", 0).Direction = System.Data.ParameterDirection.InputOutput;

                try
                {
                    _sqlcommand.ExecuteNonQuery();
                    returnvalue = Convert.ToInt32(_sqlcommand.Parameters["@returnValue"].Value);
                }
                catch (Exception ex)
                {
                    Common.LogError(ex);
                }
                finally
                {
                    _sqlcon.Close();
                    _sqlcommand.Dispose();
                }
            }
            return(returnvalue);
        }
예제 #4
0
 internal int Insert(BOWithDrawManage _bowmng)
 {
     return(_dawmng.IUD_BoWithDrawManage(_bowmng));
 }
예제 #5
0
 public int Update(BOWithDrawManage _bowdwmng)
 {
     return(_dawdwmng.IUDWithDrawManage(_bowdwmng));
 }
예제 #6
0
 public List <BOWithDrawManage> SelectWithDrawManageList(BOWithDrawManage _bowdwmng)
 {
     return(_dawdwmng.SelectWithDrawManageList(_bowdwmng));
 }