public static bool UpdateOrderInfo(BatchShipping o) { try { string query = @"update BatchShipping set OrderNo = @OrderNo,subOrderNo = @subOrderNo,yunDanNo = @yunDanNo,commpany = @commpany where id = @id"; SqlParameter[] param = new SqlParameter[] { new SqlParameter("@OrderNo", o.OrderNo), new SqlParameter("@subOrderNo", o.SubOrderNo), new SqlParameter("@yunDanNo", o.YunDanNo), new SqlParameter("@commpany", o.Commpany), new SqlParameter("@id", o.Id) }; DataBase.ExecuteSql(query, param); return(true); } catch (Exception ex) { ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data); return(false); } }
public static bool AddBatchShipping(BatchShipping o) { try { string query = @"insert into BatchShipping(sellerNick,OrderNo,subOrderNo,yunDanNo,commpany,status,createDate) values(@sellerNick,@OrderNo,@subOrderNo,@yunDanNo,@commpany,@status,@createDate)"; SqlParameter[] param = new SqlParameter[] { new SqlParameter("@sellerNick", o.SellerNick), new SqlParameter("@OrderNo", o.OrderNo), new SqlParameter("@subOrderNo", o.SubOrderNo), new SqlParameter("@yunDanNo", o.YunDanNo), new SqlParameter("@commpany", o.Commpany), new SqlParameter("@status", o.Status), new SqlParameter("@createDate", DateTime.Now.ToShortDateString()) }; DataBase.ExecuteSql(query, param); return(true); } catch (Exception ex) { ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data); return(false); } }
public static bool AddBatchShipping(BatchShipping o) { return(BatchShippingDAL.AddBatchShipping(o)); }
public static bool UpdateOrderInfo(BatchShipping o) { return(BatchShippingDAL.UpdateOrderInfo(o)); }