예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadporetnallocsingle(ref DataRow row, Loadporetnallocsingle entity)
 {
     row.SetField("warrantyfl", entity.warrantyfl);
     row.SetField("prod", entity.prod);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("whse", entity.whse);
     row.SetField("proof", entity.proof);
 }
예제 #2
0
        public static Loadporetnallocsingle BuildLoadporetnallocsingleFromRow(DataRow row)
        {
            Loadporetnallocsingle entity = new Loadporetnallocsingle();

            entity.warrantyfl = row.Field <bool>("warrantyfl");
            entity.prod       = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.proddesc   = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.whse       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.proof      = row.IsNull("proof") ? decimal.Zero : row.Field <decimal>("proof");
            return(entity);
        }