예제 #1
0
 public OrgDepartmentCollection GetSubCharge(string employeeID)
 {
     OrgDepartmentCollection depts = new OrgDepartmentCollection();
     if (!string.IsNullOrEmpty(employeeID))
     {
         SFITeachers data = new SFITeachers();
         data.TeacherID = employeeID;
         if (this.teacherEntity.LoadRecord(ref data))
         {
             OrgDepartment dept = new OrgDepartment();
             dept.DepartmentID = data.SchoolID;
             dept.DepartmentName = data.SchoolName;
             depts.Add(dept);
         }
     }
     return depts;
 }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                SFITeachers data = new SFITeachers();
                data.TeacherID = this.TeacherID.IsValid ? this.TeacherID : GUIDEx.New;
                data.TeacherCode = this.txtTeacherCode.Text.Trim();
                data.TeacherName = this.txtTeacherName.Text.Trim();
                data.SchoolID = this.pbSchool.Value;
                data.SchoolName = this.pbSchool.Text;
                data.SyncStatus = int.Parse(this.ddlSyncStatus.SelectedValue);

                if (this.presenter.UpdateTeachers(data))
                    this.SaveData();
            }
            catch (Exception ex)
            {
                this.ShowMessage(ex.Message);
            }
        }