コード例 #1
0
        public static Apeiinvdetpohdr BuildApeiinvdetpohdrFromRow(DataRow row)
        {
            Apeiinvdetpohdr entity = new Apeiinvdetpohdr();

            entity.groupnm                  = row.IsNull("groupnm") ? string.Empty : row.Field <string>("groupnm");
            entity.createddt                = row.Field <DateTime?>("createddt");
            entity.groupseqno               = row.IsNull("groupseqno") ? 0 : row.Field <int>("groupseqno");
            entity.pono                     = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.ponoenabled              = row.Field <bool>("ponoenabled");
            entity.posuf                    = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.potranstype              = row.IsNull("potranstype") ? string.Empty : row.Field <string>("potranstype");
            entity.totlineamt               = row.IsNull("totlineamt") ? decimal.Zero : row.Field <decimal>("totlineamt");
            entity.podisc                   = row.IsNull("podisc") ? decimal.Zero : row.Field <decimal>("podisc");
            entity.podiscenabled            = row.Field <bool>("podiscenabled");
            entity.allocationtype           = row.IsNull("allocationtype") ? string.Empty : row.Field <string>("allocationtype");
            entity.allocationtypeenabled    = row.Field <bool>("allocationtypeenabled");
            entity.closefl                  = row.Field <bool>("closefl");
            entity.closeflenabled           = row.Field <bool>("closeflenabled");
            entity.closewhencostedfl        = row.Field <bool>("closewhencostedfl");
            entity.closewhencostedflenabled = row.Field <bool>("closewhencostedflenabled");
            entity.addonapplyty             = row.IsNull("addonapplyty") ? string.Empty : row.Field <string>("addonapplyty");
            entity.addonapplytyenabled      = row.Field <bool>("addonapplytyenabled");
            entity.addonfrompoln            = row.IsNull("addonfrompoln") ? 0 : row.Field <int>("addonfrompoln");
            entity.addonfrompolnenabled     = row.Field <bool>("addonfrompolnenabled");
            entity.addontopoln              = row.IsNull("addontopoln") ? 0 : row.Field <int>("addontopoln");
            entity.addontopolnenabled       = row.Field <bool>("addontopolnenabled");
            entity.addonpolnlist            = row.IsNull("addonpolnlist") ? string.Empty : row.Field <string>("addonpolnlist");
            entity.addonpolnlisteenabled    = row.Field <bool>("addonpolnlisteenabled");
            entity.costord                  = row.IsNull("costord") ? decimal.Zero : row.Field <decimal>("costord");
            entity.costordenabled           = row.Field <bool>("costordenabled");
            entity.vendno                   = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.shipfmno                 = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.receiverno               = row.IsNull("receiverno") ? string.Empty : row.Field <string>("receiverno");
            entity.whse                     = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.podivno                  = row.IsNull("podivno") ? 0 : row.Field <int>("podivno");
            entity.divnodesc                = row.IsNull("divnodesc") ? string.Empty : row.Field <string>("divnodesc");
            entity.stagecd                  = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagecdword              = row.IsNull("stagecdword") ? string.Empty : row.Field <string>("stagecdword");
            entity.addonseqno               = row.IsNull("addonseqno") ? 0 : row.Field <int>("addonseqno");
            entity.poaddonfl                = row.Field <bool>("poaddonfl");
            entity.frtexpectedfl            = row.Field <bool>("frtexpectedfl");
            entity.correctionmsg            = row.IsNull("correctionmsg") ? string.Empty : row.Field <string>("correctionmsg");
            entity.notesfl                  = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.invtermstype             = row.IsNull("invtermstype") ? string.Empty : row.Field <string>("invtermstype");
            entity.invtermstypedesc         = row.IsNull("invtermstypedesc") ? string.Empty : row.Field <string>("invtermstypedesc");
            entity.potermstype              = row.IsNull("potermstype") ? string.Empty : row.Field <string>("potermstype");
            entity.potermstypedesc          = row.IsNull("potermstypedesc") ? string.Empty : row.Field <string>("potermstypedesc");
            entity.apsvtermstype            = row.IsNull("apsvtermstype") ? string.Empty : row.Field <string>("apsvtermstype");
            entity.apsvtermstypedesc        = row.IsNull("apsvtermstypedesc") ? string.Empty : row.Field <string>("apsvtermstypedesc");
            entity.termsdiffenabledfl       = row.Field <bool>("termsdiffenabledfl");
            entity.termsdiffchoice          = row.IsNull("termsdiffchoice") ? string.Empty : row.Field <string>("termsdiffchoice");
            entity.podoshipdt               = row.Field <DateTime?>("podoshipdt");
            entity.podoshipdtenabledfl      = row.Field <bool>("podoshipdtenabledfl");
            entity.apeidRowid               = row.Field <byte[]>("apeid-rowid").ToStringEncoded();
            entity.userfield                = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
コード例 #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApeiinvdetpohdr(ref DataRow row, Apeiinvdetpohdr entity)
 {
     row.SetField("groupnm", entity.groupnm);
     row.SetField("createddt", entity.createddt);
     row.SetField("groupseqno", entity.groupseqno);
     row.SetField("pono", entity.pono);
     row.SetField("ponoenabled", entity.ponoenabled);
     row.SetField("posuf", entity.posuf);
     row.SetField("potranstype", entity.potranstype);
     row.SetField("totlineamt", entity.totlineamt);
     row.SetField("podisc", entity.podisc);
     row.SetField("podiscenabled", entity.podiscenabled);
     row.SetField("allocationtype", entity.allocationtype);
     row.SetField("allocationtypeenabled", entity.allocationtypeenabled);
     row.SetField("closefl", entity.closefl);
     row.SetField("closeflenabled", entity.closeflenabled);
     row.SetField("closewhencostedfl", entity.closewhencostedfl);
     row.SetField("closewhencostedflenabled", entity.closewhencostedflenabled);
     row.SetField("addonapplyty", entity.addonapplyty);
     row.SetField("addonapplytyenabled", entity.addonapplytyenabled);
     row.SetField("addonfrompoln", entity.addonfrompoln);
     row.SetField("addonfrompolnenabled", entity.addonfrompolnenabled);
     row.SetField("addontopoln", entity.addontopoln);
     row.SetField("addontopolnenabled", entity.addontopolnenabled);
     row.SetField("addonpolnlist", entity.addonpolnlist);
     row.SetField("addonpolnlisteenabled", entity.addonpolnlisteenabled);
     row.SetField("costord", entity.costord);
     row.SetField("costordenabled", entity.costordenabled);
     row.SetField("vendno", entity.vendno);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("receiverno", entity.receiverno);
     row.SetField("whse", entity.whse);
     row.SetField("podivno", entity.podivno);
     row.SetField("divnodesc", entity.divnodesc);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagecdword", entity.stagecdword);
     row.SetField("addonseqno", entity.addonseqno);
     row.SetField("poaddonfl", entity.poaddonfl);
     row.SetField("frtexpectedfl", entity.frtexpectedfl);
     row.SetField("correctionmsg", entity.correctionmsg);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("invtermstype", entity.invtermstype);
     row.SetField("invtermstypedesc", entity.invtermstypedesc);
     row.SetField("potermstype", entity.potermstype);
     row.SetField("potermstypedesc", entity.potermstypedesc);
     row.SetField("apsvtermstype", entity.apsvtermstype);
     row.SetField("apsvtermstypedesc", entity.apsvtermstypedesc);
     row.SetField("termsdiffenabledfl", entity.termsdiffenabledfl);
     row.SetField("termsdiffchoice", entity.termsdiffchoice);
     row.SetField("podoshipdt", entity.podoshipdt);
     row.SetField("podoshipdtenabledfl", entity.podoshipdtenabledfl);
     row.SetField("apeid-rowid", entity.apeidRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }