Пример #1
0
        void save(object obj)
        {
            CreateMaxHoursDaily window = obj as CreateMaxHoursDaily;

            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.MaxHours,
                    Weight    = this.Weight
                };
            }
            else
            {
                window.Modify = new UITeacherRule()
                {
                    IsActive = this.IsActive,
                    Value    = this.MaxHours,
                    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.CreateMaxHoursDaily)(target));
                return;

            case 2:
                this.cb_checked = ((System.Windows.Controls.CheckBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #3
0
        void cancel(object obj)
        {
            CreateMaxHoursDaily window = obj as CreateMaxHoursDaily;

            window.Close();
        }