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; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.win = ((OSKernel.Presentation.Arranging.Administrative.Modify.Algo.Teacher.Dialog.CreateMaxHoursDaily)(target)); return; case 2: this.cb_checked = ((System.Windows.Controls.CheckBox)(target)); return; } this._contentLoaded = true; }
void cancel(object obj) { CreateMaxHoursDaily window = obj as CreateMaxHoursDaily; window.Close(); }