Exemple #1
0
 private void UpdateBtn_Click(object sender, EventArgs e)
 {
     if (TotalFeeTb.Text != "")
     {
         if (RollNoTb.Text != "")
         {
             _studentFee.DueDate       = DueDateValue.Value;
             _studentFee.LastDate      = LastDateValue.Value;
             _studentFee.StudentId     = int.Parse(RollNoTb.Text);
             _studentFee.RemainingDues = int.Parse(RemainingDuesTb.Text);
             _studentFee.TransportDues = int.Parse(TransportDuesTb.Text);
             _studentFee.TotalFee      = int.Parse(TotalFeeTb.Text);
             _studentFee.Fine          = int.Parse(FineTb.Text);
             _studentFeeService.UpdateStudentFee(_studentFee);
             MessageBox.Show("Record Updated Successfully!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
             TransportDuesTb.ResetText();
             PaperDuesTb.ResetText();
             FineTb.ResetText();
             DueDateValue.ResetText();
             LastDateValue.ResetText();
             TotalFeeTb.ResetText();
             RemainingDuesTb.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);
     }
 }
Exemple #2
0
 private void ClearBtn_Click(object sender, EventArgs e)
 {
     RollNoTb.ResetText();
     TransportDuesTb.ResetText();
     PaperDuesTb.ResetText();
     FineTb.ResetText();
     DueDateValue.ResetText();
     LastDateValue.ResetText();
     TotalFeeTb.ResetText();
 }
Exemple #3
0
 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);
     }
 }
Exemple #4
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();
     TransportDuesTb.ResetText();
     PaperDuesTb.ResetText();
     FineTb.ResetText();
     DueDateValue.ResetText();
     LastDateValue.ResetText();
     TotalFeeTb.ResetText();
 }