Exemplo n.º 1
0
 partial void DeletePriceList(PriceList instance);
Exemplo n.º 2
0
 partial void UpdatePriceList(PriceList instance);
Exemplo n.º 3
0
        public void UpdatePriceList(PriceListModel model)
        {
            try
            {
                PriceList table = new PriceList();
                using (VenturadaDataContext vdc = new VenturadaDataContext())
                {
                    table = vdc.PriceLists.Single(a => a.PriceListId == model.PriceListId);
                    table.ProductDescription = model.ProductDescription;
                    table.ProductName = model.ProductName;
                    table.Price = model.Price;
                    vdc.SubmitChanges();
                }
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
Exemplo n.º 4
0
 partial void InsertPriceList(PriceList instance);
Exemplo n.º 5
0
        public void InsertPriceList(PriceListModel model)
        {
            try
            {
                using (VenturadaDataContext vdc = new VenturadaDataContext())
                {
                    PriceList table = new PriceList();
                    table.ProductCategoryId = model.ProductCategoryId;
                    table.ProductName = model.ProductName;
                    table.ProductDescription = model.ProductDescription;
                    table.Price = model.Price;

                    vdc.PriceLists.InsertOnSubmit(table);
                    vdc.SubmitChanges();
                }
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }