protected void btnDelete_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrEmpty(hfId.Value))
     {
         try
         {
             SupplierFacade facade = new SupplierFacade();
             int id = Convert.ToInt32(hfId.Value);
             facade.Delete(id);
             gvSuppliers.DataBind();
             lblErrorMessage.Text = Helper.DeleteRecordMessage(true);
         }
         catch (Exception exception)
         {
             lblErrorMessage.Text = Helper.DeleteRecordMessage(false);
         }
     }
 }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        SupplierFacade facade = new SupplierFacade();
        int? id = null;
        try
        {
            id = (!String.IsNullOrEmpty(hfId.Value)) ? Convert.ToInt32(hfId.Value) : id;
            facade.Save(id, txtSupplierCode.Text, txtSupplierName.Text, txtCompany.Text, txtPhoneNo.Text
                        , txtFax.Text, txtEmail.Text, txtAddress.Text, txtPostcode.Text, txtState.Text, txtCountry.Text,
                        txtWebsite.Text
                        , DateTime.Now, DateTime.Now, user, user, txtRemarks.Text);
            lblErrorMessage.Text = Helper.SaveRecordMessage(true);
        }
        catch (Exception ex)
        {
            lblErrorMessage.Text = Helper.SaveRecordMessage(false);

        }
        gvSuppliers.DataBind();
        Helper.EnableControls(false, action);
    }