Beispiel #1
0
        public int UpdateUserInfo(Model.UserInformation cus)
        {
            string sql = "Update UserInformation set StateID=0";

            if (!string.IsNullOrEmpty(cus.Name))
            {
                sql += ",[Name]='" + cus.Name + "'";
            }
            if (!string.IsNullOrEmpty(cus.Password))
            {
                sql += ",[Password]='" + cus.Password + "'";
            }
            if (!string.IsNullOrEmpty(cus.loginName))
            {
                sql += ",[loginName]='" + cus.loginName + "'";
            }
            if (!string.IsNullOrEmpty(cus.Age))
            {
                sql += ",[Age]='" + cus.Age + "'";
            }
            if (!string.IsNullOrEmpty(cus.Gender))
            {
                sql += ",[Gender]='" + cus.Gender + "'";
            }
            if (!string.IsNullOrEmpty(cus.Telephone))
            {
                sql += ",[Telephone]='" + cus.Telephone + "'";
            }
            if (!string.IsNullOrEmpty(cus.qq))
            {
                sql += ",[qq]='" + cus.qq + "'";
            }
            if (!string.IsNullOrEmpty(cus.Mailbox))
            {
                sql += ",[Mailbox]='" + cus.Mailbox + "'";
            }
            sql += " where [UIID]='" + cus.UIID + "'";
            return(DbHelp.ExecQuery(sql));
        }
Beispiel #2
0
 public int DeleteUserInfo(string id)
 {
     return(DbHelp.ExecQuery("Update [UserInformation] set delete=1 where [UIID] in (" + id + ")"));
 }
Beispiel #3
0
 public int Userinformation(Model.UserInformation cus)
 {
     return(DbHelp.ExecQuery("insert into UserInformation values('" + cus.Name + "','" + cus.Password + "','" + cus.loginName + "','','','','','','','','')"));
 }