/// <summary> /// </summary> public int UpdateOverWorkItemAdjustByItemID(int itemID, bool isAdjust, decimal adjustHour) { SqlCommand cmd = new SqlCommand(); cmd.Parameters.Add(_PKID, SqlDbType.Int).Value = itemID; cmd.Parameters.Add(_Adjust, SqlDbType.Int).Value = OverWorkItem.AdjustToInt(isAdjust); cmd.Parameters.Add(_AdjustHour, SqlDbType.Decimal).Value = adjustHour; return(SqlHelper.ExecuteNonQuery("UpdateOverWorkItemAdjustByItemID", cmd)); }
/// <summary> /// </summary> public int UpdateOutApplicationItem(int applicationID, OutApplicationItem item) { int pkid; SqlCommand cmd = new SqlCommand(); cmd.Parameters.Add(_PKID, SqlDbType.Int).Value = item.ItemID; cmd.Parameters.Add(_OutApplicationID, SqlDbType.Int).Value = applicationID; cmd.Parameters.Add(_From, SqlDbType.DateTime).Value = item.FromDate; cmd.Parameters.Add(_To, SqlDbType.DateTime).Value = item.ToDate; cmd.Parameters.Add(_CostTime, SqlDbType.Decimal).Value = item.CostTime; cmd.Parameters.Add(_Status, SqlDbType.Int).Value = item.Status.Id; cmd.Parameters.Add(_Adjust, SqlDbType.Int).Value = OverWorkItem.AdjustToInt(item.Adjust); cmd.Parameters.Add(_AdjustHour, SqlDbType.Decimal).Value = item.AdjustHour; return(SqlHelper.ExecuteNonQuery("UpdateOutApplicationItem", cmd)); }
///<summary> /// ²éѯÉêÇë ///</summary> ///<param name="employeeID"></param> ///<param name="formTime"></param> ///<param name="toTime"></param> ///<param name="status"></param> ///<returns></returns> #endregion #region item /// <summary> /// </summary> public int InsertOutApplicationItem(int applicationID, OutApplicationItem item) { int pkid; SqlCommand cmd = new SqlCommand(); cmd.Parameters.Add(_PKID, SqlDbType.Int).Direction = ParameterDirection.Output; cmd.Parameters.Add(_OutApplicationID, SqlDbType.Int).Value = applicationID; cmd.Parameters.Add(_From, SqlDbType.DateTime).Value = item.FromDate; cmd.Parameters.Add(_To, SqlDbType.DateTime).Value = item.ToDate; cmd.Parameters.Add(_CostTime, SqlDbType.Decimal).Value = item.CostTime; cmd.Parameters.Add(_Status, SqlDbType.Int).Value = item.Status.Id; cmd.Parameters.Add(_Adjust, SqlDbType.Int).Value = OverWorkItem.AdjustToInt(item.Adjust); cmd.Parameters.Add(_AdjustHour, SqlDbType.Decimal).Value = item.AdjustHour; SqlHelper.ExecuteNonQueryReturnPKID("InsertOutApplicationItem", cmd, out pkid); return(pkid); }