Beispiel #1
0
        private void button10_Click(object sender, EventArgs e)
        {
            Hide();
            NoticeClass newObj = new NoticeClass();

            newObj.whoLoggedIn = this.whoLoggedIn;
            newObj.Show();
        }
Beispiel #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            ///delete employee
            string time   = comboBox1.Text;
            Notice objNew = db.Notices.SingleOrDefault(x => x.Date == time);

            db.Notices.DeleteOnSubmit(objNew);
            db.SubmitChanges();
            MessageBox.Show("Notice Deleted");

            //opening this window by refershing again
            Hide();
            NoticeClass nObj = new NoticeClass();

            nObj.whoLoggedIn = this.whoLoggedIn;
            nObj.Show();
        }
Beispiel #3
0
        private void button5_Click(object sender, EventArgs e)
        {
            ///adding notice
            notDb.Posted_By = whoLoggedIn;
            notDb.Message   = textBox1.Text;
            notDb.Date      = DateTime.Now.ToString();


            db.Notices.InsertOnSubmit(notDb);
            db.SubmitChanges();

            MessageBox.Show("Notice Posted");


            Hide();
            NoticeClass newObj = new NoticeClass();

            newObj.whoLoggedIn = this.whoLoggedIn;
            newObj.Show();
        }