Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWtlnties(ref DataRow row, Wtlnties entity)
 {
     row.SetField("wtno", entity.wtno);
     row.SetField("wtsuf", entity.wtsuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("seqno", entity.seqno);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("orderaltno", entity.orderaltno);
     row.SetField("orderaltsuf", entity.orderaltsuf);
     row.SetField("linealtno", entity.linealtno);
     row.SetField("seqaltno", entity.seqaltno);
     row.SetField("wtcono", entity.wtcono);
     row.SetField("transtype", entity.transtype);
     row.SetField("name", entity.name);
     row.SetField("cleartiefl", entity.cleartiefl);
     row.SetField("oordertype", entity.oordertype);
     row.SetField("oorderaltno", entity.oorderaltno);
     row.SetField("oorderaltsuf", entity.oorderaltsuf);
     row.SetField("olinealtno", entity.olinealtno);
     row.SetField("oseqaltno", entity.oseqaltno);
     row.SetField("owtcono", entity.owtcono);
     row.SetField("repairordno", entity.repairordno);
     row.SetField("repairordsuf", entity.repairordsuf);
     row.SetField("tietype", entity.tietype);
     row.SetField("modified", entity.modified);
     row.SetField("tierecid", entity.tierecid);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Wtlnties BuildWtlntiesFromRow(DataRow row)
        {
            Wtlnties entity = new Wtlnties();

            entity.wtno         = row.IsNull("wtno") ? 0 : row.Field <int>("wtno");
            entity.wtsuf        = row.IsNull("wtsuf") ? 0 : row.Field <int>("wtsuf");
            entity.lineno       = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.seqno        = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.ordertype    = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.orderaltno   = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno");
            entity.orderaltsuf  = row.IsNull("orderaltsuf") ? 0 : row.Field <int>("orderaltsuf");
            entity.linealtno    = row.IsNull("linealtno") ? 0 : row.Field <int>("linealtno");
            entity.seqaltno     = row.IsNull("seqaltno") ? 0 : row.Field <int>("seqaltno");
            entity.wtcono       = row.IsNull("wtcono") ? 0 : row.Field <int>("wtcono");
            entity.transtype    = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.name         = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.cleartiefl   = row.Field <bool>("cleartiefl");
            entity.oordertype   = row.IsNull("oordertype") ? string.Empty : row.Field <string>("oordertype");
            entity.oorderaltno  = row.IsNull("oorderaltno") ? 0 : row.Field <int>("oorderaltno");
            entity.oorderaltsuf = row.IsNull("oorderaltsuf") ? 0 : row.Field <int>("oorderaltsuf");
            entity.olinealtno   = row.IsNull("olinealtno") ? 0 : row.Field <int>("olinealtno");
            entity.oseqaltno    = row.IsNull("oseqaltno") ? decimal.Zero : row.Field <decimal>("oseqaltno");
            entity.owtcono      = row.IsNull("owtcono") ? 0 : row.Field <int>("owtcono");
            entity.repairordno  = row.IsNull("repairordno") ? 0 : row.Field <int>("repairordno");
            entity.repairordsuf = row.IsNull("repairordsuf") ? 0 : row.Field <int>("repairordsuf");
            entity.tietype      = row.IsNull("tietype") ? string.Empty : row.Field <string>("tietype");
            entity.modified     = row.Field <bool>("modified");
            entity.tierecid     = row.IsNull("tierecid") ? 0 : row.Field <long>("tierecid");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }