private void InitializeClass() { AccessRights = (Hashtable)Session["AccessRight"]; btn_Delete.Enabled = canWrite("frm_Product"); btn_Save.Enabled = canWrite("frm_Product"); _product = new AppObjects.Product(); }
protected void Page_Load(object sender, EventArgs e) { _product = new AppObjects.Product(); _dataset = _product.GetDataSet(); Session["ID"] = ""; FillGridView(); }
private void InitializeClass(long pLongID) { AccessRights = (Hashtable)Session["AccessRight"]; btn_Delete.Enabled = canWrite("frm_Product"); btn_Save.Enabled = canWrite("frm_Product"); _product = new AppObjects.Product(pLongID); if (!Page.IsPostBack) AssignDataToTextbox(); }
protected void Page_Load(object sender, EventArgs e) { if (!(Boolean)Session["AllowLogin"]) Response.Redirect("Login.aspx"); AccessRights = (Hashtable)Session["AccessRight"]; if (isDenied("frm_Product")) { Response.Redirect("Home.aspx"); } else { _product = new AppObjects.Product(); _dataset = _product.GetDataSet(); Session["ID"] = ""; FillGridView(); } }
protected void dd_Product_SelectedIndexChanged(object sender, EventArgs e) { _product = new AppObjects.Product(long.Parse(dd_Product.SelectedValue)); txt_Price.Text = _product.Price.ToString(); Session["Product"] = _product; }
/// <summary> ///Pre-Condition:Textboxes are checked for correct format ///Post-Condition:Child data associated with current record is assigned ///Description:Sets Assigns child data associated with current record /// </summary> private void assignChildData() { _product = (AppObjects.Product)Session["Product"]; _sale.SaleLineClass.SaleNumber = _sale.PKID; _sale.SaleLineClass.ProductNumber = long.Parse(dd_Product.SelectedValue.ToString()); _sale.SaleLineClass.productCode = _product.Code; _sale.SaleLineClass.ProductName = dd_Product.SelectedItem.ToString(); _sale.SaleLineClass.ProductPrice = decimal.Parse(txt_Price.Text); _sale.SaleLineClass.SaleLineQty = long.Parse(txt_Qty.Text); _sale.SaleLineClass.SaleLineSubTotal = Decimal.Parse(txt_Qty.Text) * Decimal.Parse(txt_Price.Text); }
private void InitializeClass(long pLongID) { _product = new AppObjects.Product(pLongID); if (!Page.IsPostBack) AssignDataToTextbox(); }
private void InitializeClass() { _product = new AppObjects.Product(); }