예제 #1
0
        private void GetPlan()
        {
            try
            {
                string postData = "ZY={0}&NJ={1}&Submit=" + HttpUtility.UrlEncode("查询", Encoding.GetEncoding("GB2312"));
                //string[] department = File.ReadAllLines(Department_Path);
                string[] data = sm.ParsePlanID(
                    web.getPage("http://xscj.hit.edu.cn/hitjwgl/xs/kcxx/ZXJH.asp",
                                Encoding.GetEncoding("GB2312"),
                                null,
                                true)
                    );

                if (data == null)
                {
                    throw new Exception("提取执行计划页面个人信息出错!!!");
                }

                postData = String.Format(postData, data[0], data[1]);

                string ret = web.postData("http://xscj.hit.edu.cn/hitjwgl/xs/kcxx/ZXJH.asp",
                                          postData,
                                          Encoding.GetEncoding("GB2312"),
                                          null,
                                          true
                                          );
                sm.ParsePlan(ret);
            }
            catch (Exception excp)
            {
                Error.RecordLog(excp, "Opps,出现错误了!建议将相同目录下的helper.ini删除再试试!");
                return;
            }
        }
예제 #2
0
        public LoginForm(ref Web web)
        {
            InitializeComponent();
            this.web = web;
            web.getPage(refer,Encoding.GetEncoding("GB2312"),null,true);
            codeImg.Image = web.getCodeImg(codeImgUrl, refer);
            stuNum.Text = INI.ReadIniData("user", "uid", "", @".\helper.ini");
            string password = INI.ReadIniData("user", "pwd", "", @".\helper.ini");

            if (password != "")
                this.remember.Checked = true;
            if(password != "")
                pwd.Text = Crypt.Decrypt(password);
            this.AcceptButton = login;
        }
예제 #3
0
        public LoginForm(ref Web web)
        {
            InitializeComponent();
            this.web = web;
            web.getPage(refer, Encoding.GetEncoding("GB2312"), null, true);
            codeImg.Image = web.getCodeImg(codeImgUrl, refer);
            stuNum.Text   = INI.ReadIniData("user", "uid", "", @".\helper.ini");
            string password = INI.ReadIniData("user", "pwd", "", @".\helper.ini");

            if (password != "")
            {
                this.remember.Checked = true;
            }
            if (password != "")
            {
                pwd.Text = Crypt.Decrypt(password);
            }
            this.AcceptButton = login;
        }