public static Loadtcompssingle BuildLoadtcompssingleFromRow(DataRow row) { Loadtcompssingle entity = new Loadtcompssingle(); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.proddesc = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc"); entity.reqfl = row.Field <bool>("reqfl"); entity.nsreqfl = row.Field <bool>("nsreqfl"); entity.texpoptionschecked = row.Field <bool>("texpoptionschecked"); entity.texpoptionsenabled = row.Field <bool>("texpoptionsenabled"); entity.texpgrpsenabled = row.Field <bool>("texpgrpsenabled"); entity.texpkeywdsenabled = row.Field <bool>("texpkeywdsenabled"); entity.treqonlyenabled = row.Field <bool>("treqonlyenabled"); entity.reqnsmsg = row.IsNull("reqnsmsg") ? string.Empty : row.Field <string>("reqnsmsg"); entity.reqnsmsgvisible = row.Field <bool>("reqnsmsgvisible"); entity.modwmfl = row.Field <bool>("modwmfl"); entity.seecostfl = row.Field <bool>("seecostfl"); entity.icsnpofl = row.Field <bool>("icsnpofl"); entity.iclotrcpttype = row.IsNull("iclotrcpttype") ? string.Empty : row.Field <string>("iclotrcpttype"); entity.maddaproductenabled = row.Field <bool>("maddaproductenabled"); entity.mdeleteaproductenabled = row.Field <bool>("mdeleteaproductenabled"); entity.mmodifyaproductenabled = row.Field <bool>("mmodifyaproductenabled"); entity.seriallotfl = row.Field <bool>("seriallotfl"); entity.ourproc = row.IsNull("ourproc") ? string.Empty : row.Field <string>("ourproc"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromLoadtcompssingle(ref DataRow row, Loadtcompssingle entity) { row.SetField("prod", entity.prod); row.SetField("proddesc", entity.proddesc); row.SetField("reqfl", entity.reqfl); row.SetField("nsreqfl", entity.nsreqfl); row.SetField("texpoptionschecked", entity.texpoptionschecked); row.SetField("texpoptionsenabled", entity.texpoptionsenabled); row.SetField("texpgrpsenabled", entity.texpgrpsenabled); row.SetField("texpkeywdsenabled", entity.texpkeywdsenabled); row.SetField("treqonlyenabled", entity.treqonlyenabled); row.SetField("reqnsmsg", entity.reqnsmsg); row.SetField("reqnsmsgvisible", entity.reqnsmsgvisible); row.SetField("modwmfl", entity.modwmfl); row.SetField("seecostfl", entity.seecostfl); row.SetField("icsnpofl", entity.icsnpofl); row.SetField("iclotrcpttype", entity.iclotrcpttype); row.SetField("maddaproductenabled", entity.maddaproductenabled); row.SetField("mdeleteaproductenabled", entity.mdeleteaproductenabled); row.SetField("mmodifyaproductenabled", entity.mmodifyaproductenabled); row.SetField("seriallotfl", entity.seriallotfl); row.SetField("ourproc", entity.ourproc); }