Пример #1
0
        private NewCourseInfo produceNewCourseInfo()
        {
            NewCourseInfo info = new NewCourseInfo();

            setInfoBase(ref info);
            setInfoWeight(ref info);
            return(info);
        }
Пример #2
0
        private void setInfoWeight(ref NewCourseInfo info)
        {
            NewWeight newWeight = new NewWeight();

            newWeight.attendance    = attWeight.getSelectedIntValue();
            newWeight.late          = lateWeight.getSelectedIntValue();
            newWeight.absenteeism   = absWeight.getSelectedIntValue();
            newWeight.sickLeave     = sickWeight.getSelectedIntValue();
            newWeight.businessLeave = busWeight.getSelectedIntValue();
            info.weight             = newWeight;
        }
Пример #3
0
 private void yesButton_Click(object sender, EventArgs e)
 {
     if (isFieldsReady() && yes != null)
     {
         NewCourseInfo courseInfo = produceNewCourseInfo();
         yes(courseInfo);
     }
     else
     {
         HKConfirmForm.showConfirmForm("信息未填写完整");
     }
 }
Пример #4
0
 private void yesButtonHandler(NewCourseInfo info)
 {
     Model.Course course = hall.courseRef;
     course.name   = info.name;
     course.id     = info.id;
     course.remark = info.remark;
     course.getRecord(Record.RType.attendance).weight    = info.weight.attendance;
     course.getRecord(Record.RType.late).weight          = info.weight.late;
     course.getRecord(Record.RType.sickLeave).weight     = info.weight.sickLeave;
     course.getRecord(Record.RType.businessLeave).weight = info.weight.businessLeave;
     course.getRecord(Record.RType.absenteeism).weight   = info.weight.absenteeism;
     GlobalStation.shareInstance.librarySave(delegate() {
         hall.updateCourseInfo(course.name, course.id, course.remark);
     }, null);
     Close();
 }
Пример #5
0
 private void setInfoBase(ref NewCourseInfo info)
 {
     info.name   = nameBox.textBox.Text;
     info.id     = idBox.textBox.Text;
     info.remark = remarkBox.text;
 }