Ejemplo n.º 1
0
        public static int AddItem(LTS.Item item)
        {
            int?ItemID = -1;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.InsertItem(item.ItemStatus, item.ProductID, item.StoreID, item.TagEPC, ref ItemID);
                }
            }
            catch (Exception ex)
            {
            }
            return(ItemID.Value);
        }
Ejemplo n.º 2
0
        public static List <LTS.Item> GetItem()
        {
            List <LTS.Item> item = new List <LTS.Item>();

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    item = access.Item.ToList();
                }
            }
            catch (Exception ex)
            {
            }
            return(item);
        }
Ejemplo n.º 3
0
        public static int AddAntenna(LTS.Antenna antenna)
        {
            int?AntennaID = -1;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.InsertAntenna(antenna.AntennaNumber, antenna.ReaderID, antenna.RxPower, antenna.TxPower, ref AntennaID);
                }
            }
            catch (Exception ex)
            {
            }
            return(AntennaID.Value);
        }
Ejemplo n.º 4
0
        public static List <LTS.Category> GetCategory()
        {
            List <LTS.Category> category = new List <LTS.Category>();

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    category = access.Category.ToList();
                }
            }
            catch (Exception ex)
            {
            }
            return(category);
        }
Ejemplo n.º 5
0
        public static int AddCategory(LTS.Category category)
        {
            int?CategoryID = -1;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.InsertCategory(category.CategoryDescription, category.CategoryName, ref CategoryID);
                }
            }
            catch (Exception ex)
            {
            }
            return(CategoryID.Value);
        }
Ejemplo n.º 6
0
        public static List <LTS.Antenna> GetAntenna()
        {
            List <LTS.Antenna> antenna = new List <LTS.Antenna>();

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    antenna = access.Antenna.ToList();
                }
            }
            catch (Exception ex)
            {
            }
            return(antenna);
        }
Ejemplo n.º 7
0
        public static int AddBrand(LTS.Brand brand)
        {
            int?BrandID = -1;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.InsertBrand(brand.BrandDescription, brand.BrandName, ref BrandID);
                }
            }
            catch (Exception ex)
            {
            }
            return(BrandID.Value);
        }
Ejemplo n.º 8
0
        public static List <LTS.Brand> GetBrand()
        {
            List <LTS.Brand> brand = new List <LTS.Brand>();

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    brand = access.Brand.ToList();
                }
            }
            catch (Exception ex)
            {
            }
            return(brand);
        }
Ejemplo n.º 9
0
        public static int AddBookOut(LTS.BookOut bookOut)
        {
            int?BookOutID = -1;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.InsertBookOut(bookOut.Date, bookOut.ItemID, bookOut.Project, bookOut.Reason, bookOut.UserID, ref BookOutID);
                }
            }
            catch (Exception ex)
            {
            }
            return(BookOutID.Value);
        }
Ejemplo n.º 10
0
        public static List <LTS.BookOut> GetBookOut()
        {
            List <LTS.BookOut> bookOut = new List <LTS.BookOut>();

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    bookOut = access.BookOut.ToList();
                }
            }
            catch (Exception ex)
            {
            }
            return(bookOut);
        }
Ejemplo n.º 11
0
        public static List <LTS.Product> GetProduct()
        {
            List <LTS.Product> product = new List <LTS.Product>();

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    product = access.Product.ToList();
                }
            }
            catch (Exception ex)
            {
            }
            return(product);
        }
Ejemplo n.º 12
0
        public static int AddProduct(LTS.Product product)
        {
            int?ProductID = -1;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.InsertProduct(product.BarcodeID, product.BrandID, product.CategoryID, product.ProductDescription, product.ProductName, ref ProductID);
                }
            }
            catch (Exception ex)
            {
            }
            return(ProductID.Value);
        }
Ejemplo n.º 13
0
        public static int AddEmployee(LTS.Employee employee)
        {
            int?EmployeeID = -1;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.InsertEmployee(employee.Activated, employee.CellNo, employee.Email, employee.EmpAddress, employee.IDno, employee.IsAdmin, employee.Name, employee.Pass, employee.Salary, employee.Surname, employee.Username, ref EmployeeID);
                }
            }
            catch (Exception ex)
            {
            }
            return(EmployeeID.Value);
        }
Ejemplo n.º 14
0
        public static List <LTS.Employee> GetEmployee()
        {
            List <LTS.Employee> employee = new List <LTS.Employee>();

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    employee = access.Employee.ToList();
                }
            }
            catch (Exception ex)
            {
            }
            return(employee);
        }
Ejemplo n.º 15
0
        public static List <LTS.Barcode> GetBarcode()
        {
            List <LTS.Barcode> barcode = new List <LTS.Barcode>();

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    barcode = access.Barcode.ToList();
                }
            }
            catch (Exception ex)
            {
            }
            return(barcode);
        }
Ejemplo n.º 16
0
        public static List <LTS.User> GetUser()
        {
            List <LTS.User> user = new List <LTS.User>();

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    user = access.User.ToList();
                }
            }
            catch (Exception ex)
            {
            }
            return(user);
        }
Ejemplo n.º 17
0
        public static int AddUser(LTS.User user)
        {
            int?UserID = -1;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.InsertUser(user.UserActivated, user.UserAdmin, user.UserEmail, user.UserIdentityNumber, user.UserName, user.UserPassword, user.UserSurname, ref UserID);
                }
            }
            catch (Exception ex)
            {
            }
            return(UserID.Value);
        }
Ejemplo n.º 18
0
        public static List <LTS.Store> GetStore()
        {
            List <LTS.Store> store = new List <LTS.Store>();

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    store = access.Store.ToList();
                }
            }
            catch (Exception ex)
            {
            }
            return(store);
        }
Ejemplo n.º 19
0
        public static int AddStore(LTS.Store store)
        {
            int?StoreID = -1;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.InsertStore(store.StoreLocation, store.StoreName, ref StoreID);
                }
            }
            catch (Exception ex)
            {
            }
            return(StoreID.Value);
        }
Ejemplo n.º 20
0
        public static List <LTS.Settings> GetSettings()
        {
            List <LTS.Settings> settings = new List <LTS.Settings>();

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    settings = access.Settings.ToList();
                }
            }
            catch (Exception ex)
            {
            }
            return(settings);
        }
Ejemplo n.º 21
0
        public static int AddSettings(LTS.Settings settings)
        {
            int?SettingsID = -1;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.InsertSettings(settings.SettingsName, settings.SettingsSelect, settings.StoreID, ref SettingsID);
                }
            }
            catch (Exception ex)
            {
            }
            return(SettingsID.Value);
        }
Ejemplo n.º 22
0
        public static int AddReader(LTS.Reader reader)
        {
            int?ReaderID = -1;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.InsertReader(reader.IPaddress, reader.NumAntennas, reader.SettingsID, ref ReaderID);
                }
            }
            catch (Exception ex)
            {
            }
            return(ReaderID.Value);
        }
Ejemplo n.º 23
0
        public static List <LTS.Reader> GetReader()
        {
            List <LTS.Reader> reader = new List <LTS.Reader>();

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    reader = access.Reader.ToList();
                }
            }
            catch (Exception ex)
            {
            }
            return(reader);
        }
Ejemplo n.º 24
0
        public static int AddBarcode(LTS.Barcode barcode)
        {
            int?BarcodeID = -1;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.InsertBarcode(barcode.BarcodeNumber, ref BarcodeID);
                }
            }
            catch (Exception ex)
            {
            }
            return(BarcodeID.Value);
        }
Ejemplo n.º 25
0
        public static bool RemoveCustomer(int CustomerID)
        {
            bool deleted = false;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.DeleteCustomer(CustomerID);
                    deleted = true;
                }
            }
            catch (Exception ex)
            {
            }
            return(deleted);
        }
Ejemplo n.º 26
0
        public static bool RemoveReserve(int ReserveID)
        {
            bool deleted = false;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.DeleteReserve(ReserveID);
                    deleted = true;
                }
            }
            catch (Exception ex)
            {
            }
            return(deleted);
        }
Ejemplo n.º 27
0
        public static bool RemoveStockRemoved(int StockRemovedID)
        {
            bool deleted = false;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.DeleteStockRemoved(StockRemovedID);
                    deleted = true;
                }
            }
            catch (Exception ex)
            {
            }
            return(deleted);
        }
Ejemplo n.º 28
0
        public static bool RemoveProduct(int ProductID)
        {
            bool deleted = false;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.DeleteProduct(ProductID);
                    deleted = true;
                }
            }
            catch (Exception ex)
            {
            }
            return(deleted);
        }
Ejemplo n.º 29
0
        public static bool RemoveAntenna(int AntennaID)
        {
            bool deleted = false;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.DeleteAntenna(AntennaID);
                    deleted = true;
                }
            }
            catch (Exception ex)
            {
            }
            return(deleted);
        }
Ejemplo n.º 30
0
        public static bool UpdateCustomer(LTS.Customer customer)
        {
            bool completed = false;

            try
            {
                using (LTS.LTSBase access = new LTS.LTSDC())
                {
                    access.UpdateCustomer(customer.CellNo, customer.CustAddress, customer.Email, customer.IDno, customer.Name, customer.Surname, customer.CustID);
                    completed = true;
                }
            }
            catch (Exception ex)
            {
                completed = false;
            }
            return(completed);
        }