Exemple #1
0
        void cancel(object obj)
        {
            CreateOddDualWeek win = obj as CreateOddDualWeek;

            win.DialogResult = false;
            //win.DialogResult = win.IsSave;
        }
Exemple #2
0
        void save(object obj)
        {
            var count = this.Classes.Count(c => c.IsChecked);

            if (count == 0)
            {
                this.ShowDialog("提示信息", "没有选择的班级", CustomControl.Enums.DialogSettingType.OnlyOkButton, CustomControl.Enums.DialogType.Warning);
                return;
            }

            var oddCourse  = this.OddCourses.FirstOrDefault(fd => fd.IsChecked);
            var dualCourse = this.DualCourses.FirstOrDefault(fd => fd.IsChecked);

            if (oddCourse == null && dualCourse == null)
            {
                this.ShowDialog("提示信息", "请选择单周或双周所上课程!", CustomControl.Enums.DialogSettingType.NoButton, CustomControl.Enums.DialogType.None);
            }
            else
            {
                CreateOddDualWeek win = obj as CreateOddDualWeek;
                win.OddCourse     = oddCourse;
                win.DualCourse    = dualCourse;
                win.SelectClasses = this.Classes.Where(c => c.IsChecked)?.ToList();
                win.DialogResult  = true;
            }
        }
Exemple #3
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.win = ((OSKernel.Presentation.Arranging.Administrative.Dialog.CreateOddDualWeek)(target));
         return;
     }
     this._contentLoaded = true;
 }