Exemple #1
0
        public static Glsfsetupa BuildGlsfsetupaFromRow(DataRow row)
        {
            Glsfsetupa entity = new Glsfsetupa();

            entity.selectionType = row.IsNull("selectionType") ? string.Empty : row.Field <string>("selectionType");
            entity.begacctno     = row.IsNull("begacctno") ? 0 : row.Field <int>("begacctno");
            entity.endacctno     = row.IsNull("endacctno") ? 0 : row.Field <int>("endacctno");
            entity.begsubno      = row.IsNull("begsubno") ? 0 : row.Field <int>("begsubno");
            entity.endsubno      = row.IsNull("endsubno") ? 0 : row.Field <int>("endsubno");
            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);
        }
Exemple #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGlsfsetupa(ref DataRow row, Glsfsetupa entity)
 {
     row.SetField("selectionType", entity.selectionType);
     row.SetField("begacctno", entity.begacctno);
     row.SetField("endacctno", entity.endacctno);
     row.SetField("begsubno", entity.begsubno);
     row.SetField("endsubno", entity.endsubno);
     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);
 }