예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApeiinvdetaddonpoaddons(ref DataRow row, Apeiinvdetaddonpoaddons entity)
 {
     row.SetField("seqno", entity.seqno);
     row.SetField("addonno", entity.addonno);
     row.SetField("addonamt", entity.addonamt);
     row.SetField("addontype", entity.addontype);
     row.SetField("addontypedisplay", entity.addontypedisplay);
     row.SetField("addoncapfl", entity.addoncapfl);
     row.SetField("addoncapfldisplay", entity.addoncapfldisplay);
     row.SetField("addondistr", entity.addondistr);
     row.SetField("addondistrdisplay", entity.addondistrdisplay);
     row.SetField("addonnet", entity.addonnet);
     row.SetField("addondesc", entity.addondesc);
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Apeiinvdetaddonpoaddons BuildApeiinvdetaddonpoaddonsFromRow(DataRow row)
        {
            Apeiinvdetaddonpoaddons entity = new Apeiinvdetaddonpoaddons();

            entity.seqno             = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.addonno           = row.IsNull("addonno") ? 0 : row.Field <int>("addonno");
            entity.addonamt          = row.IsNull("addonamt") ? decimal.Zero : row.Field <decimal>("addonamt");
            entity.addontype         = row.Field <bool>("addontype");
            entity.addontypedisplay  = row.IsNull("addontypedisplay") ? string.Empty : row.Field <string>("addontypedisplay");
            entity.addoncapfl        = row.Field <bool>("addoncapfl");
            entity.addoncapfldisplay = row.IsNull("addoncapfldisplay") ? string.Empty : row.Field <string>("addoncapfldisplay");
            entity.addondistr        = row.IsNull("addondistr") ? string.Empty : row.Field <string>("addondistr");
            entity.addondistrdisplay = row.IsNull("addondistrdisplay") ? string.Empty : row.Field <string>("addondistrdisplay");
            entity.addonnet          = row.IsNull("addonnet") ? decimal.Zero : row.Field <decimal>("addonnet");
            entity.addondesc         = row.IsNull("addondesc") ? string.Empty : row.Field <string>("addondesc");
            entity.pono      = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf     = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }