Exemplo n.º 1
0
        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.";
        }
Exemplo n.º 2
0
        public void displayPrisonRegCount()
        {
            clsPrisonerRegister count = new clsPrisonerRegister();

            txtPrisonerNo.Value = count.getPrisonRegCount().ToString();
        }