Exemple #1
0
        public void AddUserInfo(string loginName, string password, string realName, string sex, string phone, string idcard)
        {
            RentInfoHelper helper           = new RentInfoHelper();
            string         tempPass         = Encrypt.DESEncrypt(password);
            Dictionary <string, string> ret = new Dictionary <string, string>();

            try
            {
                helper.GetJSONInfo("insert into cf_user values ('" + loginName + "','" + tempPass + "','','0','','" + realName + "','','" + sex + "','" +
                                   phone + "','','','" + idcard + "','','','" + DateTime.Now.ToString() + "',0,'" + DateTime.Now.ToString() + "',0,'" + DateTime.Now.ToString() + "','0')");

                //添加默认权限
                UserInfoHelper userhelper = new UserInfoHelper();
                CFUserInfo     info       = new CFUserInfo(loginName);
                userhelper.InsertUserRole(info.UserID.ToString(), "20");
            }
            catch (Exception ex)
            {
            }
        }