Exemple #1
0
        public void Login()
        {
            var fm = this.RequestMeta.AsFormMeta();

            object[] ps        = new object[] { fm.Get("DDLServer"), fm.Get("DDLAcc"), fm.Get("EditUser"), fm.Get("EditPass"), string.Empty };
            bool     loginSucc = ESB.GetService <ServiceLogin>().Invoke(ps).Value.TryParseToBool();
            string   msg       = ps[4] as string;

            if (loginSucc)
            {
                Ajax.ShowMessage(AjaxType.Succ);
            }
            else
            {
                Session.Abandon();
                if (!string.IsNullOrEmpty(msg))
                {
                    Ajax.ShowMessage(AjaxType.Fail, msg);
                }
                else
                {
                    Ajax.ShowMessage(AjaxType.Fail, "登录失败,错误的用户名或密码!");
                }
            }
        }
Exemple #2
0
 public void ChangePW(string pw, string newpw)
 {
     Ajax.WriteRaw(ESB.GetService <UIP>().ChangePW(pw, newpw).ToString());
 }