Пример #1
0
 public string UserModify(string username, string strRealName,
                          string strphoneNumber,
                          string strAddress, string strProvince, string strCity,
                          string strTelephone, string strOtherContact, string strFax,
                          string strEmail, string Brno, string iRole, int?status)
 {
     if (username == null || iRole == null || Brno == null)
     {
         return(Global.RETURN_ERROR("信息不完整!"));
     }
     if (RegisterServer.CheckUserName(username))
     {
         return(Global.RETURN_ERROR("用户名不存在!"));
     }
     if (RegisterServer.UserModify(username, strRealName,
                                   strphoneNumber,
                                   strAddress, strProvince, strCity,
                                   strTelephone, strOtherContact, strFax,
                                   strEmail, Brno, iRole, status))
     {
         return(Global.RETURN_SUCESS);
     }
     else
     {
         return(Global.RETURN_ERROR("添加失败!"));
     }
 }
Пример #2
0
        public string UserDelete(string username)
        {
            if (username == null)
            {
                return(Global.RETURN_ERROR("输入参数不完整"));
            }
            if (RegisterServer.CheckUserName(username))
            {
                return(Global.RETURN_ERROR("用户名不存在"));
            }

            string rst = RegisterServer.DleteUser(username);

            return(rst);
        }
Пример #3
0
        //密码修改
        //测试 /Register/RoleChange?username=2222&strCompanyId=1&strCompanyName=第二车间&iRole=04
        public string PwdChange(string username, string oldpwd, string newpwd)
        {
            if (username == null || oldpwd == null || newpwd == null)
            {
                return(Global.RETURN_ERROR("输入参数不完整"));
            }
            if (RegisterServer.CheckUserName(username))
            {
                return(Global.RETURN_ERROR("用户名不存在"));
            }

            string rst = RegisterServer.PwdChange(username, oldpwd, newpwd);

            return(rst);
        }
Пример #4
0
        //角色修改
        //测试 /Register/RoleChange?username=2222&strCompanyId=1&strCompanyName=第二车间&iRole=04
        public string RoleChange(string username, string Brno, string iRole)
        {
            if (username == null || Brno == null || iRole == null)
            {
                return(Global.RETURN_ERROR("输入参数不完整"));
            }
            if (RegisterServer.CheckUserName(username))
            {
                return(Global.RETURN_ERROR("用户名不存在"));
            }

            string rst = RegisterServer.RoleChange(username, Brno, iRole);

            return(rst);
        }