예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOereturnlinelistresults(ref DataRow row, Oereturnlinelistresults entity)
 {
     row.SetField("selectfl", entity.selectfl);
     row.SetField("lineno", entity.lineno);
     row.SetField("specnstype", entity.specnstype);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("returnfl", entity.returnfl);
     row.SetField("unit", entity.unit);
     row.SetField("unitconv", entity.unitconv);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("kitfl", entity.kitfl);
     row.SetField("tallyfl", entity.tallyfl);
     row.SetField("serlottype", entity.serlottype);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("rowidoeel", entity.rowidoeel.ToByteArray());
     row.SetField("npfl", entity.npfl);
     row.SetField("npallowretfl", entity.npallowretfl);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Oereturnlinelistresults BuildOereturnlinelistresultsFromRow(DataRow row)
        {
            Oereturnlinelistresults entity = new Oereturnlinelistresults();

            entity.selectfl     = row.Field <bool>("selectfl");
            entity.lineno       = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.specnstype   = row.IsNull("specnstype") ? string.Empty : row.Field <string>("specnstype");
            entity.shipprod     = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.notesfl      = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.qtyship      = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.returnfl     = row.Field <bool>("returnfl");
            entity.unit         = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.unitconv     = row.IsNull("unitconv") ? decimal.Zero : row.Field <decimal>("unitconv");
            entity.proddesc     = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.kitfl        = row.Field <bool>("kitfl");
            entity.tallyfl      = row.Field <bool>("tallyfl");
            entity.serlottype   = row.IsNull("serlottype") ? string.Empty : row.Field <string>("serlottype");
            entity.msdsfl       = row.Field <bool>("msdsfl");
            entity.rowidoeel    = row.Field <byte[]>("rowidoeel").ToStringEncoded();
            entity.npfl         = row.Field <bool>("npfl");
            entity.npallowretfl = row.Field <bool>("npallowretfl");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }