Пример #1
0
        protected void btnCreateClass_Click1(object sender, EventArgs e)
        {
            if (txtClassName.Text == "" || txtClassSubject.Text == "")
            {
                lblClassError.Text = "Class could not be created: One or more fields were left blank.";
            }
            else
            {
                //create proxy object
                ClassService1.TeacherClass tempClass = new ClassService1.TeacherClass();

                //add values
                tempClass.Name      = txtClassName.Text;
                tempClass.Subject   = txtClassSubject.Text;
                tempClass.Username  = Session["username"].ToString();
                tempClass.User_Type = "Teacher";

                //use ws method to add object to the class

                if (pxy.CreateClass(tempClass))
                {
                    lblClassError.Text = "The class was added!";
                }
                else
                {
                    lblClassError.Text = "The class was not successfully added :(";
                }
            }
        }
Пример #2
0
 public bool DeleteClass(TeacherClass obj)
 {
     object[] results = this.Invoke("DeleteClass", new object[] {
         obj
     });
     return((bool)(results[0]));
 }
Пример #3
0
 /// <remarks/>
 public void DeleteClassAsync(TeacherClass obj, object userState)
 {
     if ((this.DeleteClassOperationCompleted == null))
     {
         this.DeleteClassOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteClassOperationCompleted);
     }
     this.InvokeAsync("DeleteClass", new object[] {
         obj
     }, this.DeleteClassOperationCompleted, userState);
 }
Пример #4
0
 /// <remarks/>
 public void DeleteClassAsync(TeacherClass obj)
 {
     this.DeleteClassAsync(obj, null);
 }
Пример #5
0
 /// <remarks/>
 public void CreateClassAsync(TeacherClass obj)
 {
     this.CreateClassAsync(obj, null);
 }