protected void uiLinkButtonAddPrice_Click(object sender, EventArgs e) { ItemPrices p = new ItemPrices(); p.AddNew(); p.ClientTypeID = Convert.ToInt32(uiDropDownListClientTypes.SelectedValue); p.ItemID = CurrentItem.ItemID; p.Price = decimal.Parse(uiTextBoxPrice.Text); p.Save(); BindPrices(); uiTextBoxPrice.Text = ""; }
private void BindPrices() { IStock.BLL.ItemPrices objData = new IStock.BLL.ItemPrices(); objData.GetPricesByItemID(CurrentItem.ItemID); uiGridViewPrices.DataSource = objData.DefaultView; uiGridViewPrices.DataBind(); }
protected void uiGridViewPrices_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "DeletePrice") { ItemPrices objData = new ItemPrices(); objData.LoadByPrimaryKey(Convert.ToInt32(e.CommandArgument.ToString()), CurrentItem.ItemID); objData.MarkAsDeleted(); objData.Save(); BindPrices(); } }