示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGlsbreqcalccriteria(ref DataRow row, Glsbreqcalccriteria entity)
 {
     row.SetField("rowid-glsb", entity.rowidGlsb.ToByteArray());
     row.SetField("entty", entity.entty);
     row.SetField("annbud", entity.annbud);
     row.SetField("calcmethod", entity.calcmethod);
     row.SetField("pctchg", entity.pctchg);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Glsbreqcalccriteria BuildGlsbreqcalccriteriaFromRow(DataRow row)
        {
            Glsbreqcalccriteria entity = new Glsbreqcalccriteria();

            entity.rowidGlsb  = row.Field <byte[]>("rowid-glsb").ToStringEncoded();
            entity.entty      = row.Field <bool>("entty");
            entity.annbud     = row.IsNull("annbud") ? decimal.Zero : row.Field <decimal>("annbud");
            entity.calcmethod = row.IsNull("calcmethod") ? string.Empty : row.Field <string>("calcmethod");
            entity.pctchg     = row.IsNull("pctchg") ? decimal.Zero : row.Field <decimal>("pctchg");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }