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 = ""; }
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(); } }