void save(object obj)
        {
            CreateClassHoursRequiredTimes window = obj as CreateClassHoursRequiredTimes;

            if (this.OpratorEnum == OperatorEnum.Add)
            {
                window.Add = new UIClassHourRule
                {
                    UID       = this.UID,
                    Weight    = this.Weight,
                    IsActive  = this.IsActive,
                    Periods   = this.getTimes(),
                    ClassID   = base.SelectMixedClass?.ID,
                    CourseID  = base.SelectMixedCourse?.ID,
                    TeacherID = base.SelectMixedTeacher?.ID,
                    TagID     = base.SelectMixedTag?.ID
                };
            }
            else
            {
                window.Modify = new UIClassHourRule
                {
                    UID       = this.UID,
                    Weight    = this.Weight,
                    IsActive  = this.IsActive,
                    Periods   = this.getTimes(),
                    ClassID   = base.SelectMixedClass?.ID,
                    CourseID  = base.SelectMixedCourse?.ID,
                    TeacherID = base.SelectMixedTeacher?.ID,
                    TagID     = base.SelectMixedTag?.ID
                };
            }

            window.DialogResult = true;
        }
示例#2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.win = ((OSKernel.Presentation.Arranging.Mixed.Modify.Algo.ClassHour.Dialog.CreateClassHoursRequiredTimes)(target));
         return;
     }
     this._contentLoaded = true;
 }
        void cancel(object obj)
        {
            CreateClassHoursRequiredTimes window = obj as CreateClassHoursRequiredTimes;

            window.Close();
        }