示例#1
0
        public static void DeleteProduct(String ID)
        {
            MsProducts product = SearchProductByID(ID);

            TokobeEntities.MsProducts.Remove(product);
            TokobeEntities.SaveChanges();
        }
示例#2
0
        public static void UpdateProduct(String ID, String Name, int Price, int Stock)
        {
            MsProducts product = SearchProductByID(ID);

            product.ProductName  = Name;
            product.ProductPrice = Price;
            product.ProductStock = Stock;
            TokobeEntities.SaveChanges();
        }
示例#3
0
        public static MsProducts InitProduct(Int64 ID, String TypeID, String Nama, int Price, int Stock)
        {
            MsProducts products = new MsProducts();

            products.ProductID     = "PT" + ID;
            products.ProductTypeID = TypeID;
            products.ProductName   = Nama;
            products.ProductPrice  = Price;
            products.ProductStock  = Stock;

            return(products);
        }