Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="takeOutObjectInfo"></param>
        /// <returns></returns>
        public int deleteTakeOutObject(TakeOutObjectInfo takeOutObjectInfo)
        {
            log.Debug("=================START deleteTakeOutObject=================");
            log.Debug("takeOutObjectInfo = " + takeOutObjectInfo.ToString());

            StringBuilder sql_delete = new StringBuilder();

            sql_delete.Append("DELETE FROM TakeOutObject WHERE takeOutObjectCode=" + takeOutObjectInfo.TakeOutObjectCode);

            int result = SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, sql_delete.ToString(), null);

            log.Debug(@"=================END deleteTakeOutObject=================");

            return(result);
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="takeOutObjectInfo"></param>
        /// <returns></returns>
        public int updateTakeOutObject(TakeOutObjectInfo takeOutObjectInfo)
        {
            log.Debug("=================START updateTakeOutObject=================");
            log.Debug("takeOutObjectInfo = " + takeOutObjectInfo.ToString());

            StringBuilder sql_update = new StringBuilder();

            sql_update.Append("UPDATE TakeOutObject SET codeName=N'" + takeOutObjectInfo.CodeName + "' , status=N'" + takeOutObjectInfo.Status + "' WHERE takeOutObjectCode=" + takeOutObjectInfo.TakeOutObjectCode);

            int result = SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, sql_update.ToString(), null);

            log.Debug(@"=================END updateTakeOutObject=================");

            return(result);
        }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="takeOutObjectInfo"></param>
        /// <returns></returns>
        public int insertTakeOutObject(TakeOutObjectInfo takeOutObjectInfo)
        {
            log.Debug("=================START insertTakeOutObject=================");
            log.Debug("takeOutObjectInfo = " + takeOutObjectInfo.ToString());

            StringBuilder sql_insert = new StringBuilder();

            sql_insert.Append("INSERT INTO TakeOutObject");
            sql_insert.Append(" (codeName,regDate,status) ");
            sql_insert.Append(" VALUES ");

            sql_insert.Append(" (N'" + takeOutObjectInfo.CodeName + "', GETDATE(),N'" + takeOutObjectInfo.Status + "')");


            int result = SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, sql_insert.ToString(), null);

            log.Debug(@"=================END insertTakeOutObject=================");

            return(result);
        }