protected void btn_Add_Click(object sender, EventArgs e)
    {
        try
        {
            _obj_smhr_TaxExempt = new SMHR_TAX_EXEMPT();

            //if (chk_Active.Checked)
            //    _obj_smhr_TaxExempt.SMHR_TAX_ACTIVE = true;
            //else
            //    _obj_smhr_TaxExempt.SMHR_TAX_ACTIVE = false;

            _obj_smhr_TaxExempt.Mode = 7;
            _obj_smhr_TaxExempt.SMHR_TAX_COUNTRY_ID = Convert.ToInt32(ddl_Country.SelectedValue);
            _obj_smhr_TaxExempt.SMHR_TAX_NAME       = Convert.ToString(rtxt_TaxName.Text.Replace("'", "''"));
            DataTable dt = BLL.get_Tax_Master(_obj_smhr_TaxExempt);
            if (Convert.ToString(dt.Rows[0]["COUNT"]) == "0")
            {
                _obj_smhr_TaxExempt.Mode              = 2;
                _obj_smhr_TaxExempt.SMHR_TAX_DESC     = Convert.ToString(rtxt_TaxDesc.Text.Replace("'", "''"));
                _obj_smhr_TaxExempt.SMHR_TAX_MAXLIMIT = Convert.ToDouble(rntxt_MaxLimit.Value);
                if (ddl_Active.SelectedValue == "1")
                {
                    _obj_smhr_TaxExempt.SMHR_TAX_ACTIVE = true;
                }
                else
                {
                    _obj_smhr_TaxExempt.SMHR_TAX_ACTIVE = false;
                }
                _obj_smhr_TaxExempt.SMHR_TAX_CREATEDBY   = Convert.ToInt32(Session["USER_ID"]);
                _obj_smhr_TaxExempt.SMHR_TAX_CREATEDDATE = DateTime.Now;
                bool status = BLL.set_TaxExempt(_obj_smhr_TaxExempt);
                if (status == true)
                {
                    BLL.ShowMessage(this, "Element Added Successfully");
                    RMP_Tax_Exempt.SelectedIndex = 0;
                    LoadDetails();
                    RG_Tax_Exempt.DataBind();
                    return;
                }
                else
                {
                    BLL.ShowMessage(this, "An Error Occured while doing the process");
                    return;
                }
            }
            else
            {
                BLL.ShowMessage(this, "Tax Element Already Exists");
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_TaxExempt", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
 protected void btn_Cancel_Click(object sender, EventArgs e)
 {
     try
     {
         clearFields();
         LoadDetails();
         RG_Tax_Exempt.DataBind();
         RMP_Tax_Exempt.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_TaxExempt", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
     }
 }