Esempio n. 1
0
 public void InsertSend(SendInfo send)
 {
     SqlHelper objSqlHelper = new SqlHelper();
     SqlParameter[] objParams = new SqlParameter[3];
     objParams[0] = new SqlParameter("@Name", send.Name);
     objParams[1] = new SqlParameter("@Price", send.Price);
     objParams[2] = new SqlParameter("@Dec", StringHelper.convertStr(send.Dec));
     objSqlHelper.ExecuteNonQuery("je_Send_InsertSend", objParams);
 }
Esempio n. 2
0
 public int UpdateSend(SendInfo send)
 {
     SqlHelper objSqlHelper = new SqlHelper();
     SqlParameter[] objParams = new SqlParameter[4];
     objParams[0] = new SqlParameter("@Name", send.Name);
     objParams[1] = new SqlParameter("@Price", send.Price);
     objParams[2] = new SqlParameter("@Dec", StringHelper.convertStr(send.Dec));
     objParams[3] = new SqlParameter("@sendID", send.SendID);
    return objSqlHelper.ExecuteNonQuery("je_Send_UpdateSend", objParams);
 }
Esempio n. 3
0
 public IList<SendInfo> GetSend()
 {
     SqlHelper objSqlHelper = new SqlHelper();
     List<SendInfo> sends = new List<SendInfo>();
     SqlDataReader reader = objSqlHelper.ExecuteReader("je_Send_GetSend");
     while (reader.Read())
     {
         SendInfo item = new SendInfo();
         item.SendID = reader.GetInt32(reader.GetOrdinal("sendID"));
         item.Name = reader.GetString(reader.GetOrdinal("Name"));
         item.Price = reader.GetDecimal(reader.GetOrdinal("Price"));
         item.Dec = reader.GetString(reader.GetOrdinal("Dec"));
         sends.Add(item);
     }
     reader.Close();
     return sends;
 }
Esempio n. 4
0
 public SendInfo GetSendByID(int sendID)
 {
     SqlHelper objSqlHelper = new SqlHelper();
     SqlParameter[] objParams = new SqlParameter[1];
     objParams[0] = new SqlParameter("@sendID", SqlDbType.Int, 4);
     objParams[0].Value = sendID;
     SqlDataReader reader = objSqlHelper.ExecuteReader("je_Send_GetSendByID", objParams);
     SendInfo item = new SendInfo();
     while (reader.Read())
     {
         item.SendID = reader.GetInt32(reader.GetOrdinal("sendID"));
         item.Name = reader.GetString(reader.GetOrdinal("Name"));
         item.Price = reader.GetDecimal(reader.GetOrdinal("Price"));
         item.Dec = reader.GetString(reader.GetOrdinal("Dec"));
     }
     reader.Close();
     return item;
 }
Esempio n. 5
0
 /// <summary>
 /// 更新配送方式信息
 /// </summary>
 /// <param name="link"></param>
 /// <returns></returns>
 public static int UpdateSend(SendInfo send)
 {
     return sends.UpdateSend(send);
 }
Esempio n. 6
0
  /// <summary>
  /// 添加配送方式信息
  /// </summary>
  /// <param name="link"></param>
 public static void InsertSend(SendInfo send)
  {
      sends.InsertSend(send);
  }