protected void btnSave_Click(object sender, EventArgs e) { clsPrisonerRegister prisonerRegister = new clsPrisonerRegister(); prisonerRegister.PRISChShNo = Convert.ToInt32(txtChargeSheetNo.Value); prisonerRegister.PRISCrimeDone = txtTypeofCrime.Value; prisonerRegister.PRISIdMark = txtIdentificationMark.Value; prisonerRegister.PRISHeight = txtHeight.Value; prisonerRegister.PRISWeight = Convert.ToInt32(txtWeight.Value); prisonerRegister.PRISColor = txtColor.Value; try { prisonerRegister.AddPrisoner(); displayPrisonRegCount(); } catch (Exception ex) { throw; } ClearAll(); lblMessage.Text = "Prisoner record has been added successfully."; }
public void displayPrisonRegCount() { clsPrisonerRegister count = new clsPrisonerRegister(); txtPrisonerNo.Value = count.getPrisonRegCount().ToString(); }