Ejemplo n.º 1
0
        public static Icipfetchtransdetresults BuildIcipfetchtransdetresultsFromRow(DataRow row)
        {
            Icipfetchtransdetresults entity = new Icipfetchtransdetresults();

            entity.invno         = row.IsNull("invno") ? string.Empty : row.Field <string>("invno");
            entity.origcost      = row.IsNull("origcost") ? decimal.Zero : row.Field <decimal>("origcost");
            entity.spprccstinfo  = row.IsNull("spprccstinfo") ? string.Empty : row.Field <string>("spprccstinfo");
            entity.custno        = row.IsNull("custno") ? string.Empty : row.Field <string>("custno");
            entity.icswcost      = row.IsNull("icswcost") ? decimal.Zero : row.Field <decimal>("icswcost");
            entity.cost          = row.IsNull("cost") ? decimal.Zero : row.Field <decimal>("cost");
            entity.enterdt       = row.Field <DateTime?>("enterdt");
            entity.divno         = row.IsNull("divno") ? 0 : row.Field <int>("divno");
            entity.divnodesc     = row.IsNull("divnodesc") ? string.Empty : row.Field <string>("divnodesc");
            entity.jrnlno        = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.setno         = row.IsNull("setno") ? 0 : row.Field <int>("setno");
            entity.refer         = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.packlistno    = row.IsNull("packlistno") ? string.Empty : row.Field <string>("packlistno");
            entity.ordernosuf    = row.IsNull("ordernosuf") ? string.Empty : row.Field <string>("ordernosuf");
            entity.ordernosuflbl = row.IsNull("ordernosuflbl") ? string.Empty : row.Field <string>("ordernosuflbl");
            entity.usageprod     = row.IsNull("usageprod") ? string.Empty : row.Field <string>("usageprod");
            entity.lineno        = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.mergedfl      = row.Field <bool>("mergedfl");
            entity.usagewhse     = row.IsNull("usagewhse") ? string.Empty : row.Field <string>("usagewhse");
            entity.usageqty      = row.IsNull("usageqty") ? decimal.Zero : row.Field <decimal>("usageqty");
            entity.seqno         = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.usagefl       = row.Field <bool>("usagefl");
            entity.ticketno      = row.IsNull("ticketno") ? string.Empty : row.Field <string>("ticketno");
            entity.lastupdate    = row.IsNull("lastupdate") ? string.Empty : row.Field <string>("lastupdate");
            entity.addedinfo1    = row.IsNull("addedinfo1") ? string.Empty : row.Field <string>("addedinfo1");
            entity.addedinfo3    = row.IsNull("addedinfo3") ? string.Empty : row.Field <string>("addedinfo3");
            entity.addedinfo2    = row.IsNull("addedinfo2") ? string.Empty : row.Field <string>("addedinfo2");
            entity.pocost        = row.IsNull("pocost") ? decimal.Zero : row.Field <decimal>("pocost");
            entity.pocurrency    = row.IsNull("pocurrency") ? string.Empty : row.Field <string>("pocurrency");
            entity.potariffamt   = row.IsNull("potariffamt") ? decimal.Zero : row.Field <decimal>("potariffamt");
            entity.potariffrt    = row.IsNull("potariffrt") ? decimal.Zero : row.Field <decimal>("potariffrt");
            entity.poexchrate    = row.IsNull("poexchrate") ? decimal.Zero : row.Field <decimal>("poexchrate");
            entity.podomcost     = row.IsNull("podomcost") ? decimal.Zero : row.Field <decimal>("podomcost");
            entity.transtype     = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.postdt        = row.Field <DateTime?>("postdt");
            entity.notesid       = row.IsNull("notesid") ? 0 : row.Field <int>("notesid");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcipfetchtransdetresults(ref DataRow row, Icipfetchtransdetresults entity)
 {
     row.SetField("invno", entity.invno);
     row.SetField("origcost", entity.origcost);
     row.SetField("spprccstinfo", entity.spprccstinfo);
     row.SetField("custno", entity.custno);
     row.SetField("icswcost", entity.icswcost);
     row.SetField("cost", entity.cost);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("divno", entity.divno);
     row.SetField("divnodesc", entity.divnodesc);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("setno", entity.setno);
     row.SetField("refer", entity.refer);
     row.SetField("packlistno", entity.packlistno);
     row.SetField("ordernosuf", entity.ordernosuf);
     row.SetField("ordernosuflbl", entity.ordernosuflbl);
     row.SetField("usageprod", entity.usageprod);
     row.SetField("lineno", entity.lineno);
     row.SetField("mergedfl", entity.mergedfl);
     row.SetField("usagewhse", entity.usagewhse);
     row.SetField("usageqty", entity.usageqty);
     row.SetField("seqno", entity.seqno);
     row.SetField("usagefl", entity.usagefl);
     row.SetField("ticketno", entity.ticketno);
     row.SetField("lastupdate", entity.lastupdate);
     row.SetField("addedinfo1", entity.addedinfo1);
     row.SetField("addedinfo3", entity.addedinfo3);
     row.SetField("addedinfo2", entity.addedinfo2);
     row.SetField("pocost", entity.pocost);
     row.SetField("pocurrency", entity.pocurrency);
     row.SetField("potariffamt", entity.potariffamt);
     row.SetField("potariffrt", entity.potariffrt);
     row.SetField("poexchrate", entity.poexchrate);
     row.SetField("podomcost", entity.podomcost);
     row.SetField("transtype", entity.transtype);
     row.SetField("postdt", entity.postdt);
     row.SetField("notesid", entity.notesid);
     row.SetField("userfield", entity.userfield);
 }