private void button3_Click(object sender, EventArgs e) { DateTime dt = new DateTime(); string s = DateTime.Now.ToString(); UpcomingEvent xaxxc = new UpcomingEvent(); xaxxc.Projectname = this.textBox3.Text; xaxxc.ProjectID = this.textBox5.Text; xaxxc.Projectarea = this.textBox2.Text; xaxxc.ProposedDate = Convert.ToDateTime(this.textBox1.Text); //bList.Add(bd); AeMployeeRepisotary depkRepof = new AeMployeeRepisotary(); if (depkRepof.Updatex(xaxxc)) { MessageBox.Show("Update Success", "Update"); AeMployeeRepisotary ZxRee = new AeMployeeRepisotary(); List <UpcomingEvent> bList = ZxRee.GetAllUpcomingList(); this.UpcomingProjectGridView2.DataSource = bList; } else { MessageBox.Show("Can Not Update", "Update Error"); } }
private void DeleteUser_Click(object sender, EventArgs e) { DateTime dt = new DateTime(); UpcomingEvent tasf = new UpcomingEvent(); tasf.Projectname = this.textBox3.Text; tasf.ProjectID = this.textBox5.Text; tasf.Projectarea = this.textBox2.Text; String ProjectIdtext = this.textBox5.Text; // tasf.ProposedDate = Convert.ToDateTime(this.textBox1.Text); //bList.Add(bd); AeMployeeRepisotary depkRepof = new AeMployeeRepisotary(); if (depkRepof.Delete(ProjectIdtext)) { MessageBox.Show("dElete Success", "Update"); AeMployeeRepisotary accRepo = new AeMployeeRepisotary(); List <UpcomingEvent> bList = accRepo.GetAllUpcomingList(); this.UpcomingProjectGridView2.DataSource = bList; } else { MessageBox.Show("Can Not dElete", "dElete Error"); } }
private void LoadDistributedButton_Click(object sender, EventArgs e) { // GetAllUpcomingList AeMployeeRepisotary accRepo = new AeMployeeRepisotary(); List <UpcomingEvent> bList = accRepo.GetAllUpcomingList(); this.UpcomingProjectGridView2.DataSource = bList; }
private void button2_Click(object sender, EventArgs e) { DateTime dt = new DateTime(); string s = DateTime.Now.ToString(); UpcomingEvent bd = new UpcomingEvent(); bd.Projectname = this.textBox3.Text; bd.ProjectID = this.textBox5.Text; bd.Projectarea = this.textBox2.Text; bd.ProposedDate = Convert.ToDateTime(this.textBox1.Text); //bList.Add(bd); AeMployeeRepisotary depkRepo = new AeMployeeRepisotary(); if (depkRepo.Insert(bd)) { MessageBox.Show("Can Insert ", "Insert Sucess"); this.textBox3.Text = ""; this.textBox2.Text = ""; this.textBox5.Text = ""; this.textBox1.Text = ""; AeMployeeRepisotary accRepo = new AeMployeeRepisotary(); List <UpcomingEvent> bList = accRepo.GetAllUpcomingList(); this.UpcomingProjectGridView2.DataSource = bList; } else { MessageBox.Show("Can Not Insert ", "Insert Error"); } }