public TaxCategory SaveInfo() { TaxCategory taxCategory = TaxCategoryManager.GetTaxCategoryByID(this.TaxCategoryID); if (taxCategory != null) { taxCategory = TaxCategoryManager.UpdateTaxCategory(taxCategory.TaxCategoryID, txtName.Text, txtDisplayOrder.Value, taxCategory.CreatedOn, DateTime.Now); } else { DateTime now = DateTime.Now; taxCategory = TaxCategoryManager.InsertTaxCategory(txtName.Text, txtDisplayOrder.Value, now, now); } return(taxCategory); }
private void BindData() { TaxCategory taxCategory = TaxCategoryManager.GetTaxCategoryByID(this.TaxCategoryID); if (taxCategory != null) { this.txtName.Text = taxCategory.Name; this.txtDisplayOrder.Value = taxCategory.DisplayOrder; this.pnlCreatedOn.Visible = true; this.pnlUpdatedOn.Visible = true; this.lblCreatedOn.Text = DateTimeHelper.ConvertToUserTime(taxCategory.CreatedOn).ToString(); this.lblUpdatedOn.Text = DateTimeHelper.ConvertToUserTime(taxCategory.UpdatedOn).ToString(); } else { this.pnlCreatedOn.Visible = false; this.pnlUpdatedOn.Visible = false; } }