示例#1
0
 /// <remarks/>
 public void GetStudentInfoAsync(GetStudentInfoRequest GetStudentInfoRequest, object userState) {
     if ((this.GetStudentInfoOperationCompleted == null)) {
         this.GetStudentInfoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetStudentInfoOperationCompleted);
     }
     this.InvokeAsync("GetStudentInfo", new object[] {
                 GetStudentInfoRequest}, this.GetStudentInfoOperationCompleted, userState);
 }
示例#2
0
        private void GetStudentNumber()
        {
            //Initialize GetStudent Request
            Student.GetStudentInfoRequest requestGetStudent = new Student.GetStudentInfoRequest();
            requestGetStudent.TokenId = tokenId;

            //Create the GetStudentInMsg
            Student.GetStudentInMsg inMsgStudent = new Student.GetStudentInMsg();
            inMsgStudent.CorrelationId = correlationID;
            inMsgStudent.StudentId = int.Parse(Session["StudentID"].ToString()); // StudentID;

            //Bind GetStudentInMsg to the request
            requestGetStudent.Students = new Student.GetStudentInMsg[1];
            requestGetStudent.Students[0] = inMsgStudent;

            //Instantiate a Student service and url.
            Student.StudentWebService serviceStudent = new Student.StudentWebService();
            string urlStudent = System.Configuration.ConfigurationManager.AppSettings["StudentURL"];
            serviceStudent.Url = urlStudent;

            //Create GetStudent Response and pass in the request through the Student service
            Student.GetStudentInfoResponse responseGetStudent = serviceStudent.GetStudentInfo(requestGetStudent);

            //TODO - Check GetStudentInfoResponse - If not "OK" then handle somehow somewhere.
            if (responseGetStudent.TrxResult == "OK")
                StudentNumber = responseGetStudent.Students[0].StudentNumber.Trim();
            else
                StudentNumber = "0";  //TODO - is necessary??
        }
示例#3
0
 /// <remarks/>
 public void GetStudentInfoAsync(GetStudentInfoRequest GetStudentInfoRequest) {
     this.GetStudentInfoAsync(GetStudentInfoRequest, null);
 }