Ejemplo n.º 1
0
        /// <summary>
        /// request the content the productQuality content
        /// </summary>
        /// <param name="mode">mode true = active / false = passive records</param>
        /// <returns>DataTable result of the collecting</returns>
        public DataTable getTableOfProductsPartTable(bool mode)
        {
            try
            {
                //modelQualities = new ProductsModelQualityTable(,);
                modelReadingInDatas = new ProductsModelReadIn(dbci, parent);
                prodPartList        = modelReadingInDatas.getProductsPartList(mode);
                table = new DataTable();
                table.Columns.Add("Terméknév", typeof(string));   //name, typeof(integer)
                table.Columns.Add("Mértékegység", typeof(string));
                table.Columns.Add("Veszély", typeof(int));
                table.Columns.Add("Beszállítója", typeof(string));
                table.Columns.Add("Leírás", typeof(string));
                //table.Columns.Add("Módosítás", typeof(string));

                foreach (ProductQualityPart cont in prodPartList)
                {
                    table.Rows.Add(cont.productName, cont.productQantUnit, cont.productDanger,
                                   cont.productSubcontr, cont.productDescr
                                   /*modelQualities.getWhoModifiedQuality(cont.productModifiedBy)*/);
                }

                return(table);
            }
            catch (ErrorServiceCreateDataTable)
            {
                errorHandle("Adattábla megalkotása sikertelen (CtrProdDT)");
                return(null);
            }
            catch (Exception e)
            {
                errorHandle(e.Message);
                return(null);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// reads in the production strippings
        /// </summary>
        /// <param name="mode">true = act / false = history</param>
        /// <returns>readed in datas</returns>
        public DataTable getTableOfProductsFullTable(bool mode)
        {
            modelReadingInDatas = new ProductsModelReadIn(dbci, parent);
            table = new DataTable();
            table.Columns.Add("Terméknév", typeof(string));   //name, typeof(integer)
            table.Columns.Add("Kiszerelés", typeof(int));
            table.Columns.Add("Mértékegység", typeof(string));
            table.Columns.Add("Veszély", typeof(int));
            table.Columns.Add("Termékkód", typeof(string));
            table.Columns.Add("Helye", typeof(string));
            table.Columns.Add("Mennyiség", typeof(int));
            try
            {
                prodFullList = modelReadingInDatas.getProductsFullList(mode);
                foreach (ProductFullRow cont in prodFullList)
                {
                    table.Rows.Add(cont.productName, cont.productStripping, cont.productQantUnit, cont.productDanger,
                                   cont.productBarcode, cont.productPlace, cont.productQuantity);
                }

                return(table);
            }
            catch (ErrorServiceCreateDataTable)
            {
                errorHandle("Adattábla megalkotása sikertelen (CtrProdQuantDT)");
                return(null);
            }
            catch (Exception e)
            {
                errorHandle(e.Message);
                return(null);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// reads in the production strippings
        /// </summary>
        /// <param name="mode">true = act / false = history</param>
        /// <returns>readed in datas</returns>
        public DataTable getTableOfProductsFullTable(bool mode)
        {
            modelReadingInDatas = new ProductsModelReadIn(dbci, parentMain);
            table = new DataTable();
            table.Columns.Add("Srsz.", typeof(int));
            table.Columns.Add("Terméknév", typeof(string));   //name, typeof(integer)
            table.Columns.Add("Kiszerelés", typeof(int));
            table.Columns.Add("Mértékegység", typeof(string));
            table.Columns.Add("Veszély", typeof(int));
            table.Columns.Add("Termékkód", typeof(string));
            table.Columns.Add("Helye", typeof(string));
            table.Columns.Add("Mennyiség", typeof(int));
            try
            {
                prodFullList = modelReadingInDatas.getProductsFullList(mode);
                foreach (ProductFullRow cont in prodFullList)
                {
                    table.Rows.Add(cont.strippId, cont.productName, cont.productStripping, cont.productQantUnit, cont.productDanger,
                                   cont.productBarcode, cont.productPlace, cont.productQuantity);
                }

                return(table);
            }
            catch (ErrorServiceCreateDataList e)
            {
                throw new ErrorServiceProd(e.Message);
            }
            catch (Exception e)
            {
                throw new ErrorServiceProd("Ismeretlen hiba történt (ServProdQuantDT) " + e.Message);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// request the content the productQuality content
        /// </summary>
        /// <param name="mode">mode true = active / false = passive records</param>
        /// <returns>DataTable result of the collecting</returns>
        public DataTable getTableOfProductsPartTable(bool mode)
        {
            try
            {
                //modelQualities = new ProductsModelQualityTable(,);
                modelReadingInDatas = new ProductsModelReadIn(dbci, parentMain);
                prodPartList        = modelReadingInDatas.getProductsPartList(mode);
                table = new DataTable();
                table.Columns.Add("Srsz.", typeof(int));
                table.Columns.Add("Terméknév", typeof(string));   //name, typeof(integer)
                table.Columns.Add("Mértékegység", typeof(string));
                table.Columns.Add("Veszély", typeof(int));
                table.Columns.Add("Beszállítója", typeof(string));
                table.Columns.Add("Leírás", typeof(string));
                //table.Columns.Add("Módosítás", typeof(string));

                foreach (ProductQualityPart cont in prodPartList)
                {
                    table.Rows.Add(cont.productQualId, cont.productName, cont.productQantUnit, cont.productDanger,
                                   cont.productSubcontr, cont.productDescr
                                   /*modelQualities.getWhoModifiedQuality(cont.productModifiedBy)*/);
                }

                return(table);
            }
            catch (ErrorServiceCreateDataList e)
            {
                throw new ErrorServiceProd(e.Message);
            }
            catch (Exception e)
            {
                throw new ErrorServiceProd("Ismertlen hiba történt (ServProdDT) " + e.Message);
            }
        }
Ejemplo n.º 5
0
 /// <summary>
 /// gets the username, who deleted a specific record in the 'raktmennyiseg' table
 /// </summary>
 /// <param name="indexOfRecord">the index of the record</param>
 /// <returns>full name of a user</returns>
 public string getWhoModifiedTheQuantityRecord(int indexOfRecord)
 {
     try
     {
         modelReadingInDatas = new ProductsModelReadIn(dbci, parentMain);
         return(modelReadingInDatas.getWhoModifiedRecord(indexOfRecord));
     }
     catch (ErrorServiceWhoModified e)
     {
         throw new ErrorServiceProd(e.Message);
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// gets the username, who deleted a specific record in the 'raktminoseg' table
 /// </summary>
 /// <param name="indexOfRecord">the index of the record</param>
 /// <returns>full name of a user</returns>
 public string getWhoModifiedTheRecord(int indexOfRecord)
 {
     try
     {
         modelReadingInDatas = new ProductsModelReadIn(dbci, parent);
         return(modelReadingInDatas.getWhoModifiedRecord(indexOfRecord));
     }
     catch (ErrorServiceWhoModified e)
     {
         errorHandle(e.Message);
         return(null);
     }
 }
Ejemplo n.º 7
0
 public List <string> getListOfSubcontr()
 {
     modelReadingInDatas = new ProductsModelReadIn(dbci, parent);
     return(modelReadingInDatas.getSubcontrList());
 }