Example #1
0
        /// <summary>
        /// 保存考试类型
        /// </summary>
        /// <returns></returns>
        public int SaveType(string ID, string TypeName)
        {
            string sql = "";

            if (string.IsNullOrEmpty(ID))
            {
                sql = "insert into scoretype(TypeName,Isdele) values('" + TypeName + "',0)";
            }
            else
            {
                sql = "update scoretype set TypeName='" + TypeName + "' where ID=" + ID + "";
            }

            return(DBHelp.ExecutSql(sql));
        }
Example #2
0
        /// <summary>
        /// 保存用户
        /// </summary>
        /// <returns></returns>
        public int SaveUsers(string ID, string Name, string Pass)
        {
            string sql = "";

            Pass = GetMd5Str(Pass);
            if (string.IsNullOrEmpty(ID))
            {
                sql = "insert into Users(Name,Pass,Isdele) values('" + Name + "','" + Pass + "',0)";
            }
            else
            {
                sql = "update Users set Name='" + Name + "',Pass='******' where ID=" + ID + "";
            }

            return(DBHelp.ExecutSql(sql));
        }
Example #3
0
        /// <summary>
        /// / 批量修改有效日期
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="ValidTime"></param>
        /// <returns></returns>
        public int SaveValidTime(string ID, string ValidTime)
        {
            string sql = string.Format("update score set ValidTime='{0}' where ID in ({1})", ValidTime, ID);

            return(DBHelp.ExecutSql(sql));
        }
Example #4
0
        /// <summary>
        /// 考试类型
        /// </summary>
        /// <returns></returns>
        public int DeleType(string ID)
        {
            string sql = "update scoretype set Isdele=1 where ID=" + ID + "";

            return(DBHelp.ExecutSql(sql));
        }
Example #5
0
        /// <summary>
        /// del用户
        /// </summary>
        /// <returns></returns>
        public int DeleUsers(string ID)
        {
            string sql = "update Users set Isdele=1 where ID=" + ID + "";

            return(DBHelp.ExecutSql(sql));
        }