Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromKitdetailsubsresults(ref DataRow row, Kitdetailsubsresults entity)
 {
     row.SetField("comprod", entity.comprod);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("unit", entity.unit);
     row.SetField("qty", entity.qty);
     row.SetField("totneeded", entity.totneeded);
     row.SetField("qtyavail", entity.qtyavail);
     row.SetField("descrip", entity.descrip);
     row.SetField("msg", entity.msg);
 }
Ejemplo n.º 2
0
        public static Kitdetailsubsresults BuildKitdetailsubsresultsFromRow(DataRow row)
        {
            Kitdetailsubsresults entity = new Kitdetailsubsresults();

            entity.comprod   = row.IsNull("comprod") ? string.Empty : row.Field <string>("comprod");
            entity.notesfl   = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.unit      = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.qty       = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty");
            entity.totneeded = row.IsNull("totneeded") ? decimal.Zero : row.Field <decimal>("totneeded");
            entity.qtyavail  = row.IsNull("qtyavail") ? decimal.Zero : row.Field <decimal>("qtyavail");
            entity.descrip   = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.msg       = row.IsNull("msg") ? string.Empty : row.Field <string>("msg");
            return(entity);
        }