예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }