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 (TotalMarksTb.Text != "" || ObtainedMarksTb.Text != "") { if (RollNoTb.Text != "") { _studentResult.StudentId = int.Parse(RollNoTb.Text); _studentResult.TotalMarks = int.Parse(TotalMarksTb.Text); _studentResult.ObtainedMarks = int.Parse(ObtainedMarksTb.Text); var percentage = (float.Parse(ObtainedMarksTb.Text) / float.Parse(TotalMarksTb.Text)) * 100; _studentResult.Percentage = Convert.ToInt32(percentage) + "%"; _studentResultService.InsertStudentResult(_studentResult); MessageBox.Show("Record Added Successfully!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); RollNoTb.ResetText(); TotalMarksTb.ResetText(); ObtainedMarksTb.ResetText(); } else { MessageBox.Show("Please Enter Roll No.!", "Roll No. is not provided!", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { MessageBox.Show("Please Fill all fields!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void UpdateBtn_Click(object sender, EventArgs e) { if (TotalMarksTb.Text != "" || ObtainedMarksTb.Text != "") { if (RollNoTb.Text != "") { _studentResult.StudentId = int.Parse(RollNoTb.Text); _studentResult.TotalMarks = int.Parse(TotalMarksTb.Text); _studentResult.ObtainedMarks = int.Parse(ObtainedMarksTb.Text); double percentage = (double.Parse(ObtainedMarksTb.Text) / double.Parse(TotalMarksTb.Text)) * 100; _studentResult.Percentage = Math.Round(percentage, 2) + "%"; _studentResultService.UpdateStudentResult(_studentResult); MessageBox.Show("Record Updated Successfully!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); RollNoTb.ResetText(); TotalMarksTb.ResetText(); ObtainedMarksTb.ResetText(); } else { MessageBox.Show("Please Enter Roll No.!", "Roll No. is not provided!", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { MessageBox.Show("Please Fill all fields!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
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; idGB.Visible = false; grid.Visible = false; detailsGB.Visible = true; UpdateBtn.Visible = false; DeleteBtn.Visible = false; InsertBtn.Visible = true; ClearBtn.Visible = false; RollNoTb.ResetText(); NameTb.ResetText(); FatherNameTb.ResetText(); GenderTb.Text = "Select One"; PhoneTb.ResetText(); AddressTb.ResetText(); SessionTb.ResetText(); AdminDateValue.ResetText(); ClassTb.Text = "Select One"; EmailTb.ResetText(); DOBvalue.ResetText(); }
private void InsertBtn_Click(object sender, EventArgs e) { if (NameTb.Text != "" || PhoneTb.Text != "" || AddressTb.Text != "" || FatherNameTb.Text != "" || PhoneTb.Text != "" || SessionTb.Text != "") { _student.Name = NameTb.Text; _student.FatherName = FatherNameTb.Text; _student.Phone = PhoneTb.Text; _student.Address = AddressTb.Text; _student.Session = SessionTb.Text; _student.Class = ClassTb.Text; _student.Email = EmailTb.Text; _student.Dob = DOBvalue.Value; _student.AdminDate = AdminDateValue.Value; _student.Gender = GenderTb.Text; _studentService.InsertStudent(_student); MessageBox.Show("Record Added Successfully!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); RollNoTb.ResetText(); NameTb.ResetText(); FatherNameTb.ResetText(); GenderTb.Text = "Select One"; PhoneTb.ResetText(); AddressTb.ResetText(); SessionTb.ResetText(); AdminDateValue.ResetText(); ClassTb.Text = "Select One"; EmailTb.ResetText(); DOBvalue.ResetText(); } else { MessageBox.Show("Please Fill all fields!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void ClearBtn_Click(object sender, EventArgs e) { RollNoTb.ResetText(); MondayTb.ResetText(); TuesdayTb.ResetText(); WednesdayTb.ResetText(); ThursdayTb.ResetText(); FridayTb.ResetText(); SaturdayTb.ResetText(); }
private void ClearBtn_Click(object sender, EventArgs e) { RollNoTb.ResetText(); TransportDuesTb.ResetText(); PaperDuesTb.ResetText(); FineTb.ResetText(); DueDateValue.ResetText(); LastDateValue.ResetText(); TotalFeeTb.ResetText(); }
private void ClearBtn_Click(object sender, EventArgs e) { RollNoTb.ResetText(); NameTb.ResetText(); FatherNameTb.ResetText(); GenderTb.Text = "Select One"; PhoneTb.ResetText(); AddressTb.ResetText(); SessionTb.ResetText(); AdminDateValue.ResetText(); ClassTb.Text = "Select One"; EmailTb.ResetText(); DOBvalue.ResetText(); }
private void DeleteBtn_Click(object sender, EventArgs e) { if (RollNoTb.Text != "") { _studentResult.StudentId = int.Parse(RollNoTb.Text); _studentResultService.DeleteStudentResult(_studentResult.StudentId); MessageBox.Show("Record Deleted!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); RollNoTb.ResetText(); TotalMarksTb.ResetText(); ObtainedMarksTb.ResetText(); } else { MessageBox.Show("Please Enter Roll No.!", "Roll No. is not provided!", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
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 (RollNo.Text != "") { _studentFeeService.DeleteStudentFee(int.Parse(RollNoTb.Text)); MessageBox.Show("Record Deleted!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); RollNoTb.ResetText(); TransportDuesTb.ResetText(); PaperDuesTb.ResetText(); FineTb.ResetText(); DueDateValue.ResetText(); LastDateValue.ResetText(); TotalFeeTb.ResetText(); } else { MessageBox.Show("Please Enter a Roll Number!", "Roll Number is not provided", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
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; PercentageLbl.Visible = false; PercentageTb.Visible = false; RollNoTb.ResetText(); TotalMarksTb.ResetText(); ObtainedMarksTb.ResetText(); PercentageTb.ResetText(); }
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(); }
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(); TransportDuesTb.ResetText(); PaperDuesTb.ResetText(); FineTb.ResetText(); DueDateValue.ResetText(); LastDateValue.ResetText(); TotalFeeTb.ResetText(); }
private void ClearBtn_Click(object sender, EventArgs e) { RollNoTb.ResetText(); TotalMarksTb.ResetText(); ObtainedMarksTb.ResetText(); }