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

            if (this.OpratorEnum == OperatorEnum.Add)
            {
                if (this.SelectTeacher == null)
                {
                    return;
                }

                window.Add = new Model.UITeacherRule()
                {
                    IsActive  = this.IsActive,
                    UID       = this.UID,
                    TeacherID = this.SelectTeacher.ID,
                    Name      = this.SelectTeacher.Name,
                    Value     = this.MaxDays,
                    Weight    = this.Weight
                };
            }
            else
            {
                window.Modify = new UITeacherRule()
                {
                    IsActive = this.IsActive,
                    Value    = this.MaxDays,
                    Weight   = this.Weight
                };
            }

            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.Teacher.Dialog.CreateMaxDaysPerWeek)(target));
                return;

            case 2:
                this.cb_checked = ((System.Windows.Controls.CheckBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void cancel(object obj)
        {
            CreateMaxDaysPerWeek window = obj as CreateMaxDaysPerWeek;

            window.Close();
        }