public TaxCategory SaveInfo() { TaxCategory taxCategory = TaxCategoryManager.GetTaxCategoryById(this.TaxCategoryId); if (taxCategory != null) { taxCategory = TaxCategoryManager.UpdateTaxCategory(taxCategory.TaxCategoryId, txtName.Text, txtDisplayOrder.Value, taxCategory.CreatedOn, DateTime.UtcNow); } else { DateTime now = DateTime.UtcNow; 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, DateTimeKind.Utc).ToString(); this.lblUpdatedOn.Text = DateTimeHelper.ConvertToUserTime(taxCategory.UpdatedOn, DateTimeKind.Utc).ToString(); } else { this.pnlCreatedOn.Visible = false; this.pnlUpdatedOn.Visible = false; } }