private int GetLineStatus(IDataReader reader, orderLine x, int i) { string lineStatus = ReaderHelper.GetString(reader, i++); try { if (lineStatus != null) { x.lineStatus = Convert.ToInt32(lineStatus); } else { x.lineStatus = null; } } catch { x.lineStatus = null; } return(i); }
IDataReadble IDataReadble.Read(IDataReader reader) { orderLine x = new orderLine(); int i = 0; x.partNo = ReaderHelper.GetString(reader, i++); x.partDescr1 = ReaderHelper.GetString(reader, i++); x.partDescr2 = ReaderHelper.GetString(reader, i++); x.custPartNo = ReaderHelper.GetString(reader, i++); x.custPartDescr1 = ReaderHelper.GetString(reader, i++); x.custPartDescr2 = ReaderHelper.GetString(reader, i++); x.text = ReaderHelper.GetString(reader, i++); x.qtyUnit = ReaderHelper.GetDecimal(reader, i++); x.originalQtyUnit = ReaderHelper.GetDecimal(reader, i++); x.unit = ReaderHelper.GetString(reader, i++); x.unitDescr = ReaderHelper.GetString(reader, i++); x.linePos = ReaderHelper.GetInt32(reader, i++); x.lineSeq = ReaderHelper.GetInt32(reader, i++); x.lineId = ReaderHelper.GetInt32(reader, i++); x.sellingUnit = ReaderHelper.GetString(reader, i++); x.sellingUnitDesc = ReaderHelper.GetString(reader, i++); x.delDate = ReaderHelper.GetDateTime(reader, i++); i = GetLineStatus(reader, x, i); x.rcvQtyUnit = ReaderHelper.GetDecimal(reader, i++); /* * x.blockCod = ReaderHelper.GetString(reader, i++); * x.serial = ReaderHelper.GetString(reader, i++); * x.serNumb = ReaderHelper.GetString(reader, i++); * x.prodLot = ReaderHelper.GetString(reader, i++); * x.promotn = ReaderHelper.GetString(reader, i++); * x.storBat = ReaderHelper.GetString(reader, i++); * x.prodLotReq = ReaderHelper.GetString(reader, i++); */ return(x); }