コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSaeiextend(ref DataRow row, Saeiextend entity)
 {
     row.SetField("eventname", entity.eventname);
     row.SetField("shortdesc", entity.shortdesc);
     row.SetField("eventdt", entity.eventdt);
     row.SetField("eventtm", entity.eventtm);
     row.SetField("whse", entity.whse);
     row.SetField("region", entity.region);
     row.SetField("custno", entity.custno);
     row.SetField("custname", entity.custname);
     row.SetField("shipto", entity.shipto);
     row.SetField("vendno", entity.vendno);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("vendname", entity.vendname);
     row.SetField("operator", entity.@operator);
     row.SetField("transproc", entity.transproc);
     row.SetField("prod", entity.prod);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("rowid-event", entity.rowidEvent.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Saeiextend BuildSaeiextendFromRow(DataRow row)
        {
            Saeiextend entity = new Saeiextend();

            entity.eventname  = row.IsNull("eventname") ? string.Empty : row.Field <string>("eventname");
            entity.shortdesc  = row.IsNull("shortdesc") ? string.Empty : row.Field <string>("shortdesc");
            entity.eventdt    = row.Field <DateTime?>("eventdt");
            entity.eventtm    = row.IsNull("eventtm") ? string.Empty : row.Field <string>("eventtm");
            entity.whse       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.region     = row.IsNull("region") ? string.Empty : row.Field <string>("region");
            entity.custno     = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custname   = row.IsNull("custname") ? string.Empty : row.Field <string>("custname");
            entity.shipto     = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.vendno     = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.shipfmno   = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.vendname   = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname");
            entity.@operator  = row.IsNull("operator") ? string.Empty : row.Field <string>("operator");
            entity.transproc  = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc");
            entity.prod       = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.proddesc   = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.rowidEvent = row.Field <byte[]>("rowid-event").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }