/// <summary> /// 修改交期数据 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool CustomerSchedulingDetailUpdate(CustomerSchedulingDetailModel model) { string sql = @" update SJCustomerSchedulingDetail set DeliveryDate = @DeliveryDate, DeliveryQty = @DeliveryQty ,ModifyTime = getdate() where Id = @Id; "; using (var connection = SqlDb.UpdateConnection) { return(connection.Execute(sql, model) > 0); } }
/// <summary> /// 删除交期数据 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool CustomerSchedulingDetailDelete(CustomerSchedulingDetailModel model) { string sql = @" delete from SJCustomerSchedulingDetail where Id = @Id; "; using (var connection = SqlDb.UpdateConnection) { return(connection.Execute(sql, new { model.Id }) > 0); } }
/// <summary> /// 增加交期数据 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool CustomerSchedulingDetailInsert(CustomerSchedulingDetailModel model) { string sql = @" insert into SJCustomerSchedulingDetail(OrgId,OrgCode,Label,DeliveryDate,DeliveryQty,ModifyTime,FItemId,SEOutStockEntryUId) values(@OrgId,@OrgCode,@Label,@DeliveryDate,@DeliveryQty,GETDATE(),@FItemId,0); "; using (var connection = SqlDb.UpdateConnection) { return(connection.Execute(sql, model) > 0); } }