コード例 #1
0
ファイル: Form1.cs プロジェクト: ricardoalmira89/Roster
        public void ShowDialog(RosterMysqlDataContext context, User user)
        {
            InitializeComponent();

            Context = context;
            Security = new Security(StudentMainTab, StudentNavigator);
            Security.DrawTabs(user);

            Filtered_Students = Context.Students;
            studentBindingSource.DataSource = Context.Students;

            //--- Load Program/Schedule Defaults ---
            programBindingSource.DataSource = Context.Programs;
            _Program = Context.Programs.First();
            scheduleBindingSource.DataSource = _Program.Schedules.ToList();
            _Schedule = _Program.Schedules.First();

            //enrollmentOfficerBindingSource.DataSource = Context.EnrollmentOfficers;
            graduatedBindingSource.DataSource = _Student.Graduated;

            lockerBindingSource.DataSource = Context.Lockers.Where(l => l.Student.Id == null);

            RepProgram_cmb.DataSource = Context.Programs;
            DropForm.FormClosed += DropForm_FormClosed;

            ShowDialog();
        }
コード例 #2
0
ファイル: Security.cs プロジェクト: ricardoalmira89/Roster
        public void DrawTabs(User _user)
        {
            HideAll();
            Show(_user.Role.Access);

               /* _navigator.Items.Cast<ToolStripItem>().First(l => l.Name == "save_btn").Enabled = false;
            _navigator.Items.Cast<ToolStripItem>().First(l => l.Name == "add_btn").Enabled = false;*/
        }
コード例 #3
0
partial         void UpdateUser(User instance);
コード例 #4
0
partial         void InsertUser(User instance);
コード例 #5
0
partial         void DeleteUser(User instance);
コード例 #6
0
 private void detach_Users(User entity)
 {
     this.SendPropertyChanging("Users");
     entity.Role = null;
 }
コード例 #7
0
 private void attach_Users(User entity)
 {
     this.SendPropertyChanging("Users");
     entity.Role = this;
 }