public bool insertItem(string Name, string Category, int purchesdPrice, int sellingPrice, string image, bool availability, string addedDate, string description, string size, int qty)
        {
            try
            {
                itemDetailsTB newItem = new itemDetailsTB();

                newItem.Name          = Name;
                newItem.Category      = Category;
                newItem.purchesdPrice = purchesdPrice;
                newItem.sellingPrice  = sellingPrice;
                newItem.image         = image;
                newItem.availability  = availability;
                newItem.addedDate     = addedDate;
                newItem.description   = description;
                newItem.size          = size;
                newItem.qty           = qty;

                myCashDB.itemDetailsTBs.InsertOnSubmit(newItem);
                myCashDB.SubmitChanges();

                return(true);
            }
            catch
            {
                return(false);
            }
        }
예제 #2
0
 partial void DeleteitemDetailsTB(itemDetailsTB instance);
예제 #3
0
 partial void UpdateitemDetailsTB(itemDetailsTB instance);
예제 #4
0
 partial void InsertitemDetailsTB(itemDetailsTB instance);