Beispiel #1
0
        private void btn_login_Click(object sender, EventArgs e)
        {
            if (SysTools.testIsEmpty(txt_id, "请输入用户名"))
            {
                return;
            }
            if (SysTools.testIsEmpty(txt_password, "请输入用户密码"))
            {
                return;
            }

            string id = txt_id.Text.Trim();

            string url    = System.Configuration.ConfigurationManager.AppSettings["url"];
            string __ajax = System.Configuration.ConfigurationManager.AppSettings["__ajax"];

            string mobileLogin = System.Configuration.ConfigurationManager.AppSettings["mobileLogin"];

            if (mobileLogin == null)
            {
                mobileLogin = "******";
            }

            string mobileType = System.Configuration.ConfigurationManager.AppSettings["mobileType"];

            if (mobileType == null)
            {
                mobileType = "1";
            }

            string json = SysTools.GetWebContent(url + "?__ajax=" + __ajax +
                                                 "&mobileLogin="******"&mobileType=" + mobileType +
                                                 "&username="******"&password="******"id", id);

            this.DialogResult = DialogResult.OK;
            Close();
        }
Beispiel #2
0
 private void frmLogin_Load(object sender, EventArgs e)
 {
     txt_id.Text = SysTools.read_regkey("id");
 }