Ejemplo n.º 1
0
 private void InsertBtn_Click(object sender, EventArgs e)
 {
     if (RollNoTb.Text != "")
     {
         _homeWork.StudentId = int.Parse(RollNoTb.Text);
         _homeWork.Monday    = MondayTb.Text;
         _homeWork.Tuesday   = TuesdayTb.Text;
         _homeWork.Wednesday = WednesdayTb.Text;
         _homeWork.Thursday  = ThursdayTb.Text;
         _homeWork.Friday    = FridayTb.Text;
         _homeWork.Saturday  = SaturdayTb.Text;
         _homeWorkService.InsertHomeWork(_homeWork);
         MessageBox.Show("Record Inserted Successfully!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
         RollNoTb.ResetText();
         MondayTb.ResetText();
         TuesdayTb.ResetText();
         WednesdayTb.ResetText();
         ThursdayTb.ResetText();
         FridayTb.ResetText();
         SaturdayTb.ResetText();
     }
     else
     {
         MessageBox.Show("Please Enter a Roll Number!", "Roll Number is not provided", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
 private void InsertBtn_Click(object sender, EventArgs e)
 {
     if (TeacherIdTb.Text != "")
     {
         _timeTable.TeacherId = int.Parse(TeacherIdTb.Text);
         _timeTable.Monday    = MondayTb.Text;
         _timeTable.Tuesday   = TuesdayTb.Text;
         _timeTable.Wednesday = WednesdayTb.Text;
         _timeTable.Thursday  = ThursdayTb.Text;
         _timeTable.Friday    = FridayTb.Text;
         _timeTable.Saturday  = SaturdayTb.Text;
         _timeTableService.InsertTimeTable(_timeTable);
         MessageBox.Show("Record Inserted Successfully!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
         TeacherIdTb.ResetText();
         MondayTb.ResetText();
         TuesdayTb.ResetText();
         WednesdayTb.ResetText();
         ThursdayTb.ResetText();
         FridayTb.ResetText();
         SaturdayTb.ResetText();
     }
     else
     {
         MessageBox.Show("Please Enter a Teacher Id!", "Teacher Id is not provided", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Ejemplo n.º 3
0
 private void ClearBtn_Click(object sender, EventArgs e)
 {
     RollNoTb.ResetText();
     MondayTb.ResetText();
     TuesdayTb.ResetText();
     WednesdayTb.ResetText();
     ThursdayTb.ResetText();
     FridayTb.ResetText();
     SaturdayTb.ResetText();
 }
Ejemplo n.º 4
0
 private void DeleteBtn_Click(object sender, EventArgs e)
 {
     if (RollNoTb.Text != "")
     {
         _homeWorkService.DeleteHomeWork(int.Parse(RollNoTb.Text));
         MessageBox.Show("Record Deleted!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
         RollNoTb.ResetText();
         MondayTb.ResetText();
         TuesdayTb.ResetText();
         WednesdayTb.ResetText();
         ThursdayTb.ResetText();
         FridayTb.ResetText();
         SaturdayTb.ResetText();
     }
     else
     {
         MessageBox.Show("Please Enter a Roll Number!", "Roll Number is not provided", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
 private void DeleteBtn_Click(object sender, EventArgs e)
 {
     if (TeacherIdTb.Text != "")
     {
         _timeTableService.DeleteTimeTable(int.Parse(TeacherIdTb.Text));
         MessageBox.Show("Record Deleted!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
         TeacherIdTb.ResetText();
         MondayTb.ResetText();
         TuesdayTb.ResetText();
         WednesdayTb.ResetText();
         ThursdayTb.ResetText();
         FridayTb.ResetText();
         SaturdayTb.ResetText();
     }
     else
     {
         MessageBox.Show("Please Enter a Teacher Id!", "Teacher Id is not provided", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Ejemplo n.º 6
0
 private void InsertTile_Click(object sender, EventArgs e)
 {
     InsertTile.color  = Color.FromArgb(242, 242, 242);
     SelectTile.color  = Color.Wheat;
     DeleteTile.color  = Color.Wheat;
     UpdateTile.color  = Color.Wheat;
     ViewTile.color    = Color.Wheat;
     HideTile.color    = Color.Wheat;
     grid.Visible      = false;
     detailsGB.Visible = true;
     UpdateBtn.Visible = false;
     DeleteBtn.Visible = false;
     InsertBtn.Visible = true;
     ClearBtn.Visible  = false;
     Searchbtn.Visible = false;
     RollNoTb.ResetText();
     MondayTb.ResetText();
     TuesdayTb.ResetText();
     WednesdayTb.ResetText();
     ThursdayTb.ResetText();
     FridayTb.ResetText();
     SaturdayTb.ResetText();
 }