protected void btnAdd_Click(object sender, EventArgs e)
 {
     if (Request.Form[hdnVal.UniqueID] == "Update")
     {
         if (strCalc.ToLower() == "y")
         {
             oReport.UpdateOrderReportCalculation(Int32.Parse(Request.Form[hdnId.UniqueID]), intRepId, Int32.Parse(drpName.SelectedValue), txtFormula.Text);
         }
         else
         {
             oReport.UpdateOrderReportDataField(Int32.Parse(Request.Form[hdnId.UniqueID]), intRepId, txtName.Text, drpType.SelectedItem.Text);
         }
     }
     else
     {
         if (strCalc.ToLower() == "y")
         {
             oReport.AddOrderReportCalculation(intRepId, Int32.Parse(drpName.SelectedValue), txtFormula.Text);
         }
         else
         {
             oReport.AddOrderReportDataFields(intRepId, txtName.Text, drpType.SelectedItem.Text);
         }
     }
     ClientScript.RegisterClientScriptBlock(typeof(Page), "redirect", "window.navigate(window.location)", true);
 }