/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeixinquiry(ref DataRow row, Oeixinquiry entity) { row.SetField("errcd", entity.errcd); row.SetField("errmsg", entity.errmsg); row.SetField("errseqno", entity.errseqno); row.SetField("invdt", entity.invdt); row.SetField("lineno", entity.lineno); row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("whse", entity.whse); row.SetField("transproc", entity.transproc); row.SetField("stagecd", entity.stagecd); row.SetField("stagetext", entity.stagetext); row.SetField("oeixrowid", entity.oeixrowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Oeixinquiry BuildOeixinquiryFromRow(DataRow row) { Oeixinquiry entity = new Oeixinquiry(); entity.errcd = row.IsNull("errcd") ? string.Empty : row.Field <string>("errcd"); entity.errmsg = row.IsNull("errmsg") ? string.Empty : row.Field <string>("errmsg"); entity.errseqno = row.IsNull("errseqno") ? 0 : row.Field <int>("errseqno"); entity.invdt = row.Field <DateTime?>("invdt"); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.transproc = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.stagetext = row.IsNull("stagetext") ? string.Empty : row.Field <string>("stagetext"); entity.oeixrowid = row.Field <byte[]>("oeixrowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }