public static InfDet FillItemInfDet(DataRow inputRow) { byte i = 0; InfDet infDetItem = new InfDet(); infDetItem.IndicOSPK = (typeof(DBNull) == inputRow["PR_OSPK"].GetType()) ? i : byte.Parse((string)inputRow["PR_OSPK"]); infDetItem.DetNum = (typeof(DBNull) == inputRow["NDET"].GetType()) ? "" : (string)inputRow["NDET"]; infDetItem.PKP = (typeof(DBNull) == inputRow["PKP"].GetType()) ? "" : ((string)inputRow["PKP"]).Trim(); infDetItem.DocNum = (typeof(DBNull) == inputRow["NDOK"].GetType()) ? "-" : (string)inputRow["NDOK"]; infDetItem.DepProducer = (typeof(DBNull) == inputRow["CEH"].GetType()) ? 0 : DicDepCodeAndId[int.Parse(((string)inputRow["CEH"]).Trim())]; infDetItem.DepNative = (typeof(DBNull) == inputRow["DUBL_CEH"].GetType()) ? 0 : DicDepCodeAndId[int.Parse(((string)inputRow["DUBL_CEH"]).Trim())]; return infDetItem; }
private static void FilltmpInfDetRow(ref InfDet itemInfDet) { DataRow rowTempInDet = InfDetDataTable.NewRow(); rowTempInDet[0] = Properties.Settings.Default.DetID; rowTempInDet[1] = itemInfDet.DetNum; rowTempInDet[2] = itemInfDet.PKP; rowTempInDet[3] = itemInfDet.DepProducer; rowTempInDet[4] = string.Empty; rowTempInDet[5] = itemInfDet.IndicOSPK; rowTempInDet[6] = itemInfDet.DocNum; rowTempInDet[7] = itemInfDet.DepNative; rowTempInDet[8] = 1; rowTempInDet[9] = DateTime.Now; InfDetDataTable.Rows.Add(rowTempInDet); }
partial void UpdateInfDet(InfDet instance);
partial void DeleteInfDet(InfDet instance);
partial void InsertInfDet(InfDet instance);