예제 #1
0
        public DataTable SaveProduct(List<string> mainProductList)
        {
            ProductDAL product = new ProductDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start(true);
                DataTable dt = product.SaveProduct(this, db);
                //dt.Columns.Add("ProductId");
                if (dt.Rows.Count > 0)
                {
                    ProductId = dt.Rows[0][0].ToString();
                }
                if (mainProductList.Count > 0)
                {
                   
                    product.SaveMainProductOfSubProduct(ProductId, mainProductList, db);

                }
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                product = null;
            }
        }
예제 #2
0
        public DataTable GetDeletedProductListByDateRangeAll(string fromDate, string toDate, string search)
        {
            ProductDAL product = new ProductDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                DataTable dt = product.GetDeletedProductListByDateRangeAll(fromDate, toDate, search, db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                product = null;
            }
        }
예제 #3
0
        public DataTable GetProductList()
        {
            ProductDAL product = new ProductDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                DataTable dt = product.GetProductList(db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                product = null;
            }
        }
예제 #4
0
        public void DeleteProductById(string productId)
        {
            ProductDAL productDal=new ProductDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start(true);
                productDal.DeleteProductById(productId, db);
                db.Stop();
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                productDal = null;
            }
        }
예제 #5
0
        public DataTable GetMainProductListWHID(string wareHouseId)
        {
            ProductDAL product = new ProductDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                DataTable dt = product.GetMainProductListWHID(wareHouseId, db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                product = null;
            }
        }
예제 #6
0
        public DataTable GetMainProductsByWareHouseForSales()
        {
            ProductDAL product = new ProductDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                DataTable dt = product.GetMainProductsByWareHouseforSales(this, db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                product = null;
            }
        }
예제 #7
0
        public DataTable GetMainProductList()
        {
            ProductDAL productDal=new ProductDAL();
            DataTable dt=new DataTable();
            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                dt = productDal.GetMainProductList(this,db);
                db.Stop();

            }
            catch (Exception)
            {
                
                throw;
            }
            return dt;
        }
예제 #8
0
        public DataTable GetActiveProductsByWareHouseorSalesCenter(string id)
        {
            ProductDAL product = new ProductDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                DataTable dt = product.GetActiveProductsByWareHouseorSalesCenter(id, db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                product = null;
            }
        }
예제 #9
0
        public DataTable GetAllProductsByWareHouse(string Id)
        {
            ProductDAL product = new ProductDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                DataTable dt = product.GetAllProductsByWareHouse(Id, db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                product = null;
            }
        }
예제 #10
0
        public DataTable GetProductNamesBySalesCenter(string id)
        {
            ProductDAL product = new ProductDAL();
            DataTable dt=new DataTable();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                 dt = product.GetProductNamesBySalesCenter(id,db);
                db.Stop();

                
            }
            catch (Exception)
            {
                //throw;
            }
            return dt;
            //finally
            //{
            //    product = null;
            //}
        }
예제 #11
0
        public void UpdateProduct(List<string> mainProductList,string updateCondition)
        {
            ProductDAL product = new ProductDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start(true);
                DataTable dt=product.UpdateProduct(this, updateCondition, db);
                product.SaveMainProductOfSubProduct(ProductId, mainProductList, db);
                db.Stop();
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                product = null;
            }
        }
예제 #12
0
        public void UpdateProductActivation(string productId, string activationStatus)
        {
            ProductDAL product = new ProductDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start(true);
                product.UpdateProductActivation(productId, activationStatus, db);
                db.Stop();
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                product = null;
            }
        }
예제 #13
0
        public bool CheckDuplicateProductByBarcode(string barcode)
        {
            ProductDAL product = new ProductDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                bool status = product.CheckDuplicateProductByBarcode(barcode, db);
                db.Stop();
                return status;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                product = null;
            }
        }
예제 #14
0
        public bool CheckDuplicateProductByName(string productName,string warehouse,string salescenter)
        {
            ProductDAL product = new ProductDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                bool status = product.CheckDuplicateProductByName(productName,warehouse,salescenter, db);
                db.Stop();
                return status;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                product = null;
            }
        }
예제 #15
0
        public DataTable GetProductByBarcodeIdName(string productBarcodeIdName)
        {
            ProductDAL product = new ProductDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                DataTable dt = product.GetProductByBarcodeIdName(productBarcodeIdName, db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                product = null;
            }
        }
예제 #16
0
        public DataTable GetAvailableProductListBySalesCenter(string salesCenterId)
        {
            ProductDAL product = new ProductDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                DataTable dt = product.GetAvailableProductListBySalesCenter(salesCenterId, db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                product = null;
            }
        }