Esempio n. 1
0
        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 = "";
        }
Esempio n. 2
0
 private void BindPrices()
 {
     IStock.BLL.ItemPrices objData = new IStock.BLL.ItemPrices();
     objData.GetPricesByItemID(CurrentItem.ItemID);
     uiGridViewPrices.DataSource = objData.DefaultView;
     uiGridViewPrices.DataBind();
 }
Esempio n. 3
0
 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();
     }
 }