public int Renew(InsuranceApplication ia)
        {
            SqlConnection con = new SqlConnection("server=SREERAJ-PC;integrated security=true;database=obs");
            SqlCommand cmd = new SqlCommand("RenewInsuranceApplication", con);
            cmd.CommandType = CommandType.StoredProcedure;
            SqlParameter p1 = cmd.Parameters.AddWithValue("@CRN", ia.Crn);
            SqlParameter p2 = cmd.Parameters.AddWithValue("@QID", ia.Qid);

            SqlParameter returnParam = new SqlParameter();
            returnParam.Value = ParameterDirection.ReturnValue;
            con.Open();
            cmd.ExecuteNonQuery();
            return Convert.ToInt32(returnParam.Value);
        }
    protected void Button1_Click(object sender, EventArgs e)
    {
        InsuranceApplication ia = new InsuranceApplication();
        ia.Crn = Convert.ToInt32(TextBox1.Text);
        ia.Qid = Convert.ToInt32(TextBox2.Text);

        BALInsurance bi = new BALInsurance();
        int i = bi.Renew(ia);
        if (i > 0)
        {
            Label3.Text = "Renewal Success";
        }
        else
        {
            Label3.Text = "Renewal Failure";
        }
    }
 public int Renew(InsuranceApplication ia)
 {
     DALInsurance di = new DALInsurance();
     return di.Renew(ia);
 }
 public int Approve(InsuranceApplication ia)
 {
     DALInsurance di = new DALInsurance();
     return di.Approve(ia);
 }
 public int Apply(InsuranceApplication ia)
 {
     return dal.Apply(ia);
 }