Пример #1
0
 public void CreatePostStatus(LogisticsStatus ls)
 {
     SqlParameter[] param = new SqlParameter[] {
         SqlUtilities.GenerateInputNVarcharParameter("@bar_code", 50, ls.TrackNum),
         SqlUtilities.GenerateInputNVarcharParameter("@status", 50, ls.Status),
         SqlUtilities.GenerateInputNVarcharParameter("@location", 50, ls.Location),
         SqlUtilities.GenerateInputNVarcharParameter("@to_country", 50, ls.ToCountry),
         SqlUtilities.GenerateInputDateTimeParameter("@disposal_time", ls.DisposalTime),
         SqlUtilities.GenerateInputParameter("@is_arrive", SqlDbType.Bit, ls.IsArrive),
         SqlUtilities.GenerateInputDateTimeParameter("@create_time", ls.CreateTime)
     };
     string sql = "INSERT INTO post_status (bar_code, status, location, to_country, disposal_time, is_arrive, create_time) VALUES(@bar_code, @status, @location, @to_country, @disposal_time, @is_arrive, @create_time)";
     SqlHelper.ExecuteNonQuery(CommandType.Text, sql, param);
 }
Пример #2
0
 public static void CreatePostStatus(LogisticsStatus ls)
 {
     dal.CreatePostStatus(ls);
 }