public BranchController(NoticeBoardRepository noticeBoardRepository, IRulesRegulationRepository RulesRegulationRepository, IHolidayRepository holidayRepository, ISubjectRepository subjectRepository)
 {
     _noticeBoardRepository     = noticeBoardRepository;
     _RulesRegulationRepository = RulesRegulationRepository;
     _holidayRepository         = holidayRepository;
     _subjectRepository         = subjectRepository;
 }
Ejemplo n.º 2
0
        private void LoadbtnClicked(object sender, EventArgs e)
        {
            NoticeBoardRepository NoticeRepo = new NoticeBoardRepository();
            List <Notice>         nList      = NoticeRepo.GetAllNotice();

            this.NoticedataGridView.DataSource = nList;
        }
Ejemplo n.º 3
0
        public Notice_Delete(string i, string n)
        {
            InitializeComponent();
            id   = i;
            name = n;

            NoticeBoardRepository NoticeRepo = new NoticeBoardRepository();
            List <Notice>         nList      = NoticeRepo.GetAllNotice();

            this.NoticedataGridView.DataSource = nList;
        }
Ejemplo n.º 4
0
        private void DeletebtnClicked(object sender, EventArgs e)
        {
            Notice n = new Notice();

            n.Noticeid = this.Nidtbox.Text;
            NoticeBoardRepository NoticeRepo = new NoticeBoardRepository();

            if (NoticeRepo.NoticeDelete(n.Noticeid))
            {
                MessageBox.Show("Notice Information Deleted", "Delete");
            }
            else
            {
                MessageBox.Show("Can Not Delete Data", "Delete Error");
            }
        }
        private void NoticeAssClicked(object sender, EventArgs e)
        {
            Notice n = new Notice();

            n.Noticeid      = this.Nidtbox.Text;
            n.Noticesubject = this.NoticeSubjecttbox.Text;
            n.Noticedetails = this.Ndetailstbox.Text;

            NoticeBoardRepository NBRepo = new NoticeBoardRepository();

            if (NBRepo.NoticeAdd(n))
            {
                MessageBox.Show("Notice Information Added", "ADD");
            }
            else
            {
                MessageBox.Show("Can Not Add Data", "Insert Error");
            }
        }