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