/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdemimportexcelerrors(ref DataRow row, Pdemimportexcelerrors entity) { row.SetField("cFieldName", entity.cFieldName); row.SetField("pv_pdmline_rowid", entity.pvPdmlineRowid.ToByteArray()); row.SetField("iRow", entity.iRow); row.SetField("iCol", entity.iCol); row.SetField("cErrorMsg", entity.cErrorMsg); row.SetField("cColor", entity.cColor); row.SetField("cType", entity.cType); row.SetField("userfield", entity.userfield); }
public static Pdemimportexcelerrors BuildPdemimportexcelerrorsFromRow(DataRow row) { Pdemimportexcelerrors entity = new Pdemimportexcelerrors(); entity.cFieldName = row.IsNull("cFieldName") ? string.Empty : row.Field <string>("cFieldName"); entity.pvPdmlineRowid = row.Field <byte[]>("pv_pdmline_rowid").ToStringEncoded(); entity.iRow = row.IsNull("iRow") ? 0 : row.Field <int>("iRow"); entity.iCol = row.IsNull("iCol") ? 0 : row.Field <int>("iCol"); entity.cErrorMsg = row.IsNull("cErrorMsg") ? string.Empty : row.Field <string>("cErrorMsg"); entity.cColor = row.IsNull("cColor") ? string.Empty : row.Field <string>("cColor"); entity.cType = row.IsNull("cType") ? string.Empty : row.Field <string>("cType"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }