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>
        /// 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);
            }
        }