Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGlsdtransloadttresults(ref DataRow row, Glsdtransloadttresults entity)
 {
     row.SetField("glsdrowid", entity.glsdrowid.ToByteArray());
     row.SetField("groupnm", entity.groupnm);
     row.SetField("setno", entity.setno);
     row.SetField("transno", entity.transno);
     row.SetField("reversefl", entity.reversefl);
     row.SetField("glno", entity.glno);
     row.SetField("glnm", entity.glnm);
     row.SetField("gllookupnm", entity.gllookupnm);
     row.SetField("glnotesfl", entity.glnotesfl);
     row.SetField("baltype", entity.baltype);
     row.SetField("oppositefl", entity.oppositefl);
     row.SetField("percent", entity.percent);
     row.SetField("refer", entity.refer);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Glsdtransloadttresults BuildGlsdtransloadttresultsFromRow(DataRow row)
        {
            Glsdtransloadttresults entity = new Glsdtransloadttresults();

            entity.glsdrowid  = row.Field <byte[]>("glsdrowid").ToStringEncoded();
            entity.groupnm    = row.IsNull("groupnm") ? string.Empty : row.Field <string>("groupnm");
            entity.setno      = row.IsNull("setno") ? 0 : row.Field <int>("setno");
            entity.transno    = row.IsNull("transno") ? 0 : row.Field <int>("transno");
            entity.reversefl  = row.Field <bool>("reversefl");
            entity.glno       = row.IsNull("glno") ? string.Empty : row.Field <string>("glno");
            entity.glnm       = row.IsNull("glnm") ? string.Empty : row.Field <string>("glnm");
            entity.gllookupnm = row.IsNull("gllookupnm") ? string.Empty : row.Field <string>("gllookupnm");
            entity.glnotesfl  = row.IsNull("glnotesfl") ? string.Empty : row.Field <string>("glnotesfl");
            entity.baltype    = row.IsNull("baltype") ? string.Empty : row.Field <string>("baltype");
            entity.oppositefl = row.Field <bool>("oppositefl");
            entity.percent    = row.IsNull("percent") ? decimal.Zero : row.Field <decimal>("percent");
            entity.refer      = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }