Ejemplo n.º 1
0
 partial void DeleteProductCategory(ProductCategory instance);
Ejemplo n.º 2
0
 partial void UpdateProductCategory(ProductCategory instance);
Ejemplo n.º 3
0
        public void UpdateProductCategory(ProductCategoryModel pcm)
        {
            try
            {
                ProductCategory table = new ProductCategory();
                using (VenturadaDataContext vdc = new VenturadaDataContext())
                {
                    table = vdc.ProductCategories.Single(a => a.ProductCategoryId == pcm.ProductCategoryId);
                    table.ProductCategoryId = pcm.ProductCategoryId;
                    table.ProductCategory1 = pcm.ProductCategory;
                    vdc.SubmitChanges();
                }
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
Ejemplo n.º 4
0
 partial void InsertProductCategory(ProductCategory instance);
Ejemplo n.º 5
0
        public void InsertProductCategory(ProductCategoryModel pcm)
        {
            try
            {
                using (VenturadaDataContext vdc = new VenturadaDataContext())
                {
                    ProductCategory receivedPM = new ProductCategory();
                    receivedPM.ProductCategory1 = pcm.ProductCategory;

                    vdc.ProductCategories.InsertOnSubmit(receivedPM);
                    vdc.SubmitChanges();
                }
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }