/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSharedcommentresults(ref DataRow row, Sharedcommentresults entity) { row.SetField("comtype", entity.comtype); row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("lineno", entity.lineno); row.SetField("printfl", entity.printfl); row.SetField("printfl2", entity.printfl2); row.SetField("noteln", entity.noteln); row.SetField("textdelimeter", entity.textdelimeter); row.SetField("transdt", entity.transdt); row.SetField("transtm", entity.transtm); row.SetField("transproc", entity.transproc); row.SetField("operinit", entity.operinit); row.SetField("docfl", entity.docfl); row.SetField("urlfl", entity.urlfl); row.SetField("recavail", entity.recavail); row.SetField("printson", entity.printson); row.SetField("tglinvoice", entity.tglinvoice); row.SetField("tglinvoicehidden", entity.tglinvoicehidden); row.SetField("tglinvoicelabel", entity.tglinvoicelabel); row.SetField("changedfl", entity.changedfl); row.SetField("deletefl", entity.deletefl); row.SetField("tablename", entity.tablename); row.SetField("userfield", entity.userfield); }
public static Sharedcommentresults BuildSharedcommentresultsFromRow(DataRow row) { Sharedcommentresults entity = new Sharedcommentresults(); entity.comtype = row.IsNull("comtype") ? string.Empty : row.Field <string>("comtype"); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.printfl = row.Field <bool>("printfl"); entity.printfl2 = row.Field <bool>("printfl2"); entity.noteln = row.IsNull("noteln") ? string.Empty : row.Field <string>("noteln"); entity.textdelimeter = row.IsNull("textdelimeter") ? string.Empty : row.Field <string>("textdelimeter"); entity.transdt = row.Field <DateTime?>("transdt"); entity.transtm = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm"); entity.transproc = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc"); entity.operinit = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit"); entity.docfl = row.Field <bool>("docfl"); entity.urlfl = row.Field <bool>("urlfl"); entity.recavail = row.Field <bool>("recavail"); entity.printson = row.IsNull("printson") ? string.Empty : row.Field <string>("printson"); entity.tglinvoice = row.Field <bool>("tglinvoice"); entity.tglinvoicehidden = row.Field <bool>("tglinvoicehidden"); entity.tglinvoicelabel = row.IsNull("tglinvoicelabel") ? string.Empty : row.Field <string>("tglinvoicelabel"); entity.changedfl = row.Field <bool>("changedfl"); entity.deletefl = row.Field <bool>("deletefl"); entity.tablename = row.IsNull("tablename") ? string.Empty : row.Field <string>("tablename"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }