Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGliahistbalresults(ref DataRow row, Gliahistbalresults entity)
 {
     row.SetField("cGLno", entity.cGLno);
     row.SetField("glyr", entity.glyr);
     row.SetField("asofdt", entity.asofdt);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("rptnm", entity.rptnm);
     row.SetField("subbal", entity.subbal);
     row.SetField("glbal", entity.glbal);
     row.SetField("dDiff", entity.dDiff);
     row.SetField("variance", entity.variance);
     row.SetField("cLookUpNm", entity.cLookUpNm);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Gliahistbalresults BuildGliahistbalresultsFromRow(DataRow row)
        {
            Gliahistbalresults entity = new Gliahistbalresults();

            entity.cGLno     = row.IsNull("cGLno") ? string.Empty : row.Field <string>("cGLno");
            entity.glyr      = row.IsNull("glyr") ? 0 : row.Field <int>("glyr");
            entity.asofdt    = row.Field <DateTime?>("asofdt");
            entity.notesfl   = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.rptnm     = row.IsNull("rptnm") ? string.Empty : row.Field <string>("rptnm");
            entity.subbal    = row.IsNull("subbal") ? decimal.Zero : row.Field <decimal>("subbal");
            entity.glbal     = row.IsNull("glbal") ? decimal.Zero : row.Field <decimal>("glbal");
            entity.dDiff     = row.IsNull("dDiff") ? decimal.Zero : row.Field <decimal>("dDiff");
            entity.variance  = row.IsNull("variance") ? decimal.Zero : row.Field <decimal>("variance");
            entity.cLookUpNm = row.IsNull("cLookUpNm") ? string.Empty : row.Field <string>("cLookUpNm");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }