Exemplo n.º 1
0
        private void call_UserData(string username, string password)
        {
            userinforeq = fllg_req.Utility.Create(username, password);
            RequestMessage searchrequest = new RequestMessage(enumRequestType.MessageProcessor,
                enumMessageType.Utility,
                enumRequestMethod.functionOperation, this._user,
                enumSendSysId.EXceed,
                userinforeq);
            RequestWorkItem workitem = new RequestWorkItem(searchrequest, 1);
            //threadhelper.AddWorkItem(workitem);
            ResponseMessage Response = ThreadHelper.Execute(searchrequest);
            if (Response.GetErrorMessage() != string.Empty)
            {
                MessageBox.Show(Response.GetErrorMessage());
                this.usernametxt.Focus();
            }
            else
            {
                this.userinfores = Response.Deserialize<fllg_res.Utility>();
                if (this._user.UserName == string.Empty)
                {
                    MessageBox.Show("用户名不存在");
                    this.usernametxt.Focus();
                }
                else
                {
                    this.screen = this.userinfores.UtilityHeader[0].Screen.Split(new char[] { ';' });
                    //InvokeHelper.Set(this, "DialogResult", DialogResult.OK);
                    DialogResult = DialogResult.OK;

                }
            }
        }
 public static Utility Create(string username, string password)
 {
     Utility data = new Utility();
     data.UtilityHeader.userid = username;
     data.UtilityHeader.password = password;
     return data;
 }