Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="managerInfo"></param>
        /// <returns></returns>
        public int updateManager(ManagerInfo managerInfo)
        {
            log.Debug("=================START updateManager=================");
            log.Debug("managerInfo = " + managerInfo.ToString());

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

            return(0);
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="managerInfo"></param>
        /// <returns></returns>
        public int deleteManager(ManagerInfo managerInfo)
        {
            log.Debug("=================START deleteManager=================");
            log.Debug("managerInfo = " + managerInfo.ToString());

            StringBuilder sql_delete = new StringBuilder();

            sql_delete.Append("DELETE FROM Manager ");
            sql_delete.Append(" WHERE upnid='" + managerInfo.Upnid + "'");

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

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

            return(result);
        }
Example #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="managerInfo"></param>
        /// <returns></returns>
        public int insertManager(ManagerInfo managerInfo)
        {
            log.Debug("=================START insertManager=================");
            log.Debug("managerInfo = " + managerInfo.ToString());

            StringBuilder sql_insert = new StringBuilder();

            sql_insert.Append("INSERT INTO Manager");
            sql_insert.Append("(upnid,managerLevel,regDate)");
            sql_insert.Append("VALUES");
            sql_insert.Append("(N'" + managerInfo.Upnid + "',N'" + managerInfo.ManagerLevel + "',GETDATE())");

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

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

            return(result);
        }
Example #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="managerInfo"></param>
        /// <returns></returns>
        public bool existsManager(ManagerInfo managerInfo)
        {
            log.Debug("=================START existsManager=================");
            log.Debug("managerInfo = " + managerInfo.ToString());

            Object        exists     = null;
            StringBuilder sql_select = new StringBuilder();

            sql_select.Append("SELECT COUNT(*) ");
            sql_select.Append(" FROM Manager WHERE upnid='" + managerInfo.Upnid + "'");

            exists = SqlHelper.ExecuteScalar(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, sql_select.ToString(), null);

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

            if (Convert.ToInt32(exists) == 0)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }