Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGlsfsetupz(ref DataRow row, Glsfsetupz entity)
 {
     row.SetField("glacctmax", entity.glacctmax);
     row.SetField("gldelim", entity.gldelim);
     row.SetField("glsubmax", entity.glsubmax);
     row.SetField("titleText", entity.titleText);
     row.SetField("lookupName", entity.lookupName);
     row.SetField("advanceTo", entity.advanceTo);
     row.SetField("skipLines", entity.skipLines);
     row.SetField("dollarFl", entity.dollarFl);
     row.SetField("summarize", entity.summarize);
     row.SetField("addType", entity.addType);
     row.SetField("printType", entity.printType);
     row.SetField("zeroType", entity.zeroType);
     row.SetField("underlineType", entity.underlineType);
     row.SetField("comment", entity.comment);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Glsfsetupz BuildGlsfsetupzFromRow(DataRow row)
        {
            Glsfsetupz entity = new Glsfsetupz();

            entity.glacctmax     = row.IsNull("glacctmax") ? 0 : row.Field <int>("glacctmax");
            entity.gldelim       = row.IsNull("gldelim") ? string.Empty : row.Field <string>("gldelim");
            entity.glsubmax      = row.IsNull("glsubmax") ? 0 : row.Field <int>("glsubmax");
            entity.titleText     = row.IsNull("titleText") ? string.Empty : row.Field <string>("titleText");
            entity.lookupName    = row.IsNull("lookupName") ? string.Empty : row.Field <string>("lookupName");
            entity.advanceTo     = row.IsNull("advanceTo") ? 0 : row.Field <int>("advanceTo");
            entity.skipLines     = row.IsNull("skipLines") ? 0 : row.Field <int>("skipLines");
            entity.dollarFl      = row.Field <bool>("dollarFl");
            entity.summarize     = row.Field <bool>("summarize");
            entity.addType       = row.IsNull("addType") ? string.Empty : row.Field <string>("addType");
            entity.printType     = row.IsNull("printType") ? string.Empty : row.Field <string>("printType");
            entity.zeroType      = row.IsNull("zeroType") ? string.Empty : row.Field <string>("zeroType");
            entity.underlineType = row.IsNull("underlineType") ? string.Empty : row.Field <string>("underlineType");
            entity.comment       = row.IsNull("comment") ? string.Empty : row.Field <string>("comment");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }