private void UpdateForm() { Product.Description = tbxDescription.Text; Product.Name = tbxName.Text; Product.Category = bllCate.Get(Convert.ToInt32(ddlCateSecond.SelectedValue)); Product.Price = decimal.Parse(tbxPrice.Text); Product.Unit = tbxPriceUnit.Text; }
protected void Page_Load(object sender, EventArgs e) { string paramId = Request["id"]; int Id; if (int.TryParse(paramId, out Id)) { IsNew = false; } if (!IsPostBack) { Init(); if (!IsNew) { Category = bllCategory.Get(Id); LoadForm(); } } }