/// <summary> /// 注册信息 /// </summary> /// <param name="name">登陆名</param> /// <param name="pwd">密码</param> /// <returns></returns> public APIRst Register(string name, string pwd) { APIRst rst = new APIRst(); try { int ledger = 0; DataTable dt = new YDS6000.BLL.ExpApp.Home.HomeBLL(9999, 0).GetProjectList(); foreach (DataRow dr in dt.Rows) { ledger = CommFunc.ConvertDBNullToInt32(dr["Rule"]); } // bll = new YDS6000.BLL.ExpApp.SysMgr.SysMgrBLL(ledger, 1); bool existName = bll.GetExistsCrmNo(name); if (existName == true) { rst.rst = false; rst.data = ""; rst.err = new APIErr() { code = -1, msg = "登录名已存在" }; return(rst); } rst.data = bll.Register(name, pwd); } catch (Exception ex) { rst.rst = false; rst.err.code = (int)ResultCodeDefine.Error; rst.err.msg = ex.Message; FileLog.WriteLog("注册信息错误:" + ex.Message + ex.StackTrace); } return(rst); }
public SysMgrHelper() { user = WebConfig.GetSession(); bll = new YDS6000.BLL.ExpApp.SysMgr.SysMgrBLL(user.Ledger, user.Uid); }