/// <summary> /// /// </summary> /// <param name="takeOutItemCategoryInfo"></param> /// <returns></returns> public int deleteTakeOutItemCategory(TakeOutItemCategoryInfo takeOutItemCategoryInfo) { log.Debug("=================START deleteTakeOutItemCategory================="); log.Debug("takeOutItemCategoryInfo = " + takeOutItemCategoryInfo.ToString()); StringBuilder sql_delete = new StringBuilder(); sql_delete.Append("DELETE FROM TakeOutItemCategory WHERE takeOutItemCategoryCode=" + takeOutItemCategoryInfo.TakeOutItemCategoryCode); int result = SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, sql_delete.ToString(), null); log.Debug(@"=================END deleteTakeOutItemCategory================="); return(result); }
/// <summary> /// /// </summary> /// <param name="takeOutItemCategoryInfo"></param> /// <returns></returns> public int updateTakeOutItemCategory(TakeOutItemCategoryInfo takeOutItemCategoryInfo) { log.Debug("=================START updateTakeOutItemCategory================="); log.Debug("takeOutItemCategoryInfo = " + takeOutItemCategoryInfo.ToString()); StringBuilder sql_update = new StringBuilder(); sql_update.Append("UPDATE TakeOutItemCategory SET codeName=N'" + takeOutItemCategoryInfo.CodeName + "' WHERE takeOutItemCategoryCode=" + takeOutItemCategoryInfo.TakeOutItemCategoryCode); int result = SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, sql_update.ToString(), null); log.Debug(@"=================END updateTakeOutItemCategory================="); return(result); }
/// <summary> /// /// </summary> /// <param name="takeOutItemCategoryInfo"></param> /// <returns></returns> public int insertTakeOutItemCategory(TakeOutItemCategoryInfo takeOutItemCategoryInfo) { log.Debug("=================START insertTakeOutItemCategory================="); log.Debug("takeOutItemCategoryInfo = " + takeOutItemCategoryInfo.ToString()); StringBuilder sql_insert = new StringBuilder(); sql_insert.Append("INSERT INTO TakeOutItemCategory"); sql_insert.Append(" (codeName,depthID,groupID,regDate) "); sql_insert.Append(" VALUES "); sql_insert.Append(" (N'" + takeOutItemCategoryInfo.CodeName + "'," + takeOutItemCategoryInfo.DepthID + "," + takeOutItemCategoryInfo.GroupID + ",GETDATE()) "); int result = SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, sql_insert.ToString(), null); log.Debug(@"=================END insertTakeOutItemCategory================="); return(result); }