コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromKitcreatekwdsttresults(ref DataRow row, Kitcreatekwdsttresults entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("qty", entity.qty);
     row.SetField("unit", entity.unit);
     row.SetField("addfl", entity.addfl);
     row.SetField("addnewfl", entity.addnewfl);
     row.SetField("seqbef", entity.seqbef);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("unitdspl", entity.unitdspl);
     row.SetField("descrip", entity.descrip);
     row.SetField("qtyavail", entity.qtyavail);
     row.SetField("totneeded", entity.totneeded);
     row.SetField("msg", entity.msg);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Kitcreatekwdsttresults BuildKitcreatekwdsttresultsFromRow(DataRow row)
        {
            Kitcreatekwdsttresults entity = new Kitcreatekwdsttresults();

            entity.prod      = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.qty       = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty");
            entity.unit      = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.addfl     = row.Field <bool>("addfl");
            entity.addnewfl  = row.Field <bool>("addnewfl");
            entity.seqbef    = row.IsNull("seqbef") ? 0 : row.Field <int>("seqbef");
            entity.notesfl   = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.unitdspl  = row.IsNull("unitdspl") ? string.Empty : row.Field <string>("unitdspl");
            entity.descrip   = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.qtyavail  = row.IsNull("qtyavail") ? decimal.Zero : row.Field <decimal>("qtyavail");
            entity.totneeded = row.IsNull("totneeded") ? decimal.Zero : row.Field <decimal>("totneeded");
            entity.msg       = row.IsNull("msg") ? string.Empty : row.Field <string>("msg");
            entity.msdsfl    = row.Field <bool>("msdsfl");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }