/// <summary>
 /// Handles the saving of supply category
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSaveSupCat_Click(object sender, EventArgs e)
 {
     if (txtSupCat.Text != "")
     {
         SupplyCategory supCat = new SupplyCategory();
         if (_supCatId == 0)
             supCat.AddNew();
         else
             supCat.LoadByPrimaryKey(_supCatId);
         supCat.Name = txtSupCat.Text;
         supCat.Code = txtSupCode.Text;
         supCat.ParentId = ((cboSupCat.Visible) ? Convert.ToInt32(cboSupCat.SelectedValue) : 0);
         supCat.Save();
         PopulateSupplyCatTree();
     }
 }