Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaifbuildvalaborlistresults(ref DataRow row, Vaifbuildvalaborlistresults entity)
 {
     row.SetField("vano", entity.vano);
     row.SetField("vasuf", entity.vasuf);
     row.SetField("whse", entity.whse);
     row.SetField("seqno", entity.seqno);
     row.SetField("sctntype", entity.sctntype);
     row.SetField("sctncode", entity.sctncode);
     row.SetField("sctncodedesc", entity.sctncodedesc);
     row.SetField("lineno", entity.lineno);
     row.SetField("timeactty", entity.timeactty);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("ProdDesc", entity.prodDesc);
     row.SetField("timeworkdt", entity.timeworkdt);
     row.SetField("timecomment", entity.timecomment);
     row.SetField("timeslsrep", entity.timeslsrep);
     row.SetField("timeslsrepname", entity.timeslsrepname);
     row.SetField("estamt", entity.estamt);
     row.SetField("estcost", entity.estcost);
     row.SetField("estsecs", entity.estsecs);
     row.SetField("esthrs", entity.esthrs);
     row.SetField("actamt", entity.actamt);
     row.SetField("actcost", entity.actcost);
     row.SetField("actsecs", entity.actsecs);
     row.SetField("acthrs", entity.acthrs);
     row.SetField("totestamt", entity.totestamt);
     row.SetField("totestsecs", entity.totestsecs);
     row.SetField("totesthrs", entity.totesthrs);
     row.SetField("totactamt", entity.totactamt);
     row.SetField("totactsecs", entity.totactsecs);
     row.SetField("totacthrs", entity.totacthrs);
     row.SetField("tuserfield", entity.tuserfield);
 }
Ejemplo n.º 2
0
        public static Vaifbuildvalaborlistresults BuildVaifbuildvalaborlistresultsFromRow(DataRow row)
        {
            Vaifbuildvalaborlistresults entity = new Vaifbuildvalaborlistresults();

            entity.vano           = row.IsNull("vano") ? 0 : row.Field <int>("vano");
            entity.vasuf          = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf");
            entity.whse           = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.seqno          = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.sctntype       = row.IsNull("sctntype") ? string.Empty : row.Field <string>("sctntype");
            entity.sctncode       = row.IsNull("sctncode") ? string.Empty : row.Field <string>("sctncode");
            entity.sctncodedesc   = row.IsNull("sctncodedesc") ? string.Empty : row.Field <string>("sctncodedesc");
            entity.lineno         = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.timeactty      = row.IsNull("timeactty") ? string.Empty : row.Field <string>("timeactty");
            entity.shipprod       = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.prodDesc       = row.IsNull("ProdDesc") ? string.Empty : row.Field <string>("ProdDesc");
            entity.timeworkdt     = row.Field <DateTime?>("timeworkdt");
            entity.timecomment    = row.IsNull("timecomment") ? string.Empty : row.Field <string>("timecomment");
            entity.timeslsrep     = row.IsNull("timeslsrep") ? string.Empty : row.Field <string>("timeslsrep");
            entity.timeslsrepname = row.IsNull("timeslsrepname") ? string.Empty : row.Field <string>("timeslsrepname");
            entity.estamt         = row.IsNull("estamt") ? decimal.Zero : row.Field <decimal>("estamt");
            entity.estcost        = row.IsNull("estcost") ? decimal.Zero : row.Field <decimal>("estcost");
            entity.estsecs        = row.IsNull("estsecs") ? 0 : row.Field <int>("estsecs");
            entity.esthrs         = row.IsNull("esthrs") ? string.Empty : row.Field <string>("esthrs");
            entity.actamt         = row.IsNull("actamt") ? decimal.Zero : row.Field <decimal>("actamt");
            entity.actcost        = row.IsNull("actcost") ? decimal.Zero : row.Field <decimal>("actcost");
            entity.actsecs        = row.IsNull("actsecs") ? 0 : row.Field <int>("actsecs");
            entity.acthrs         = row.IsNull("acthrs") ? string.Empty : row.Field <string>("acthrs");
            entity.totestamt      = row.IsNull("totestamt") ? decimal.Zero : row.Field <decimal>("totestamt");
            entity.totestsecs     = row.IsNull("totestsecs") ? 0 : row.Field <int>("totestsecs");
            entity.totesthrs      = row.IsNull("totesthrs") ? string.Empty : row.Field <string>("totesthrs");
            entity.totactamt      = row.IsNull("totactamt") ? decimal.Zero : row.Field <decimal>("totactamt");
            entity.totactsecs     = row.IsNull("totactsecs") ? 0 : row.Field <int>("totactsecs");
            entity.totacthrs      = row.IsNull("totacthrs") ? string.Empty : row.Field <string>("totacthrs");
            entity.tuserfield     = row.IsNull("tuserfield") ? string.Empty : row.Field <string>("tuserfield");
            return(entity);
        }