void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.win = ((OSKernel.Presentation.Arranging.Administrative.Modify.Algo.Teacher.Dialog.CreateTeacherNoAvaliable)(target)); return; case 2: this.cb_checked = ((System.Windows.Controls.CheckBox)(target)); return; } this._contentLoaded = true; }
void save(object obj) { CreateTeacherNoAvaliable window = obj as CreateTeacherNoAvaliable; if (this.OpratorEnum == OperatorEnum.Add) { if (this.SelectTeacher == null) { return; } window.Add = new UITeacherRule { IsActive = this.IsActive, Name = this.SelectTeacher.Name, TeacherID = this.SelectTeacher.ID, UID = Guid.NewGuid().ToString(), Weight = this.Weight, ForbidTimes = this.getforbidTimes() }; } else { window.Modify = new UITeacherRule { IsActive = this.IsActive, Name = this.SelectTeacher.Name, TeacherID = this.SelectTeacher.ID, UID = Guid.NewGuid().ToString(), Weight = this.Weight, ForbidTimes = this.getforbidTimes() }; } window.DialogResult = true; }
void cancel(object obj) { CreateTeacherNoAvaliable window = obj as CreateTeacherNoAvaliable; window.Close(); }