コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromNoteflagsettings(ref DataRow row, Noteflagsettings entity)
 {
     row.SetField("tablename", entity.tablename);
     row.SetField("primarykey", entity.primarykey);
     row.SetField("secondarykey", entity.secondarykey);
     row.SetField("pageno", entity.pageno);
     row.SetField("noterecordtype", entity.noterecordtype);
     row.SetField("printdonotprintfl", entity.printdonotprintfl);
     row.SetField("printdonotprintflenabled", entity.printdonotprintflenabled);
     row.SetField("editmodefl", entity.editmodefl);
     row.SetField("printfl1label", entity.printfl1label);
     row.SetField("printfl1hidden", entity.printfl1hidden);
     row.SetField("printfl1enabled", entity.printfl1enabled);
     row.SetField("printfl2label", entity.printfl2label);
     row.SetField("printfl2hidden", entity.printfl2hidden);
     row.SetField("printfl2enabled", entity.printfl2enabled);
     row.SetField("printfl3label", entity.printfl3label);
     row.SetField("printfl3hidden", entity.printfl3hidden);
     row.SetField("printfl3enabled", entity.printfl3enabled);
     row.SetField("printfl4label", entity.printfl4label);
     row.SetField("printfl4hidden", entity.printfl4hidden);
     row.SetField("printfl4enabled", entity.printfl4enabled);
     row.SetField("printfl5label", entity.printfl5label);
     row.SetField("printfl5hidden", entity.printfl5hidden);
     row.SetField("printfl5enabled", entity.printfl5enabled);
     row.SetField("requiredenabled", entity.requiredenabled);
     row.SetField("securedenabled", entity.securedenabled);
     row.SetField("modifybuttonenabled", entity.modifybuttonenabled);
     row.SetField("deletebuttonenabled", entity.deletebuttonenabled);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Noteflagsettings BuildNoteflagsettingsFromRow(DataRow row)
        {
            Noteflagsettings entity = new Noteflagsettings();

            entity.tablename                = row.IsNull("tablename") ? string.Empty : row.Field <string>("tablename");
            entity.primarykey               = row.IsNull("primarykey") ? string.Empty : row.Field <string>("primarykey");
            entity.secondarykey             = row.IsNull("secondarykey") ? string.Empty : row.Field <string>("secondarykey");
            entity.pageno                   = row.IsNull("pageno") ? 0 : row.Field <int>("pageno");
            entity.noterecordtype           = row.IsNull("noterecordtype") ? string.Empty : row.Field <string>("noterecordtype");
            entity.printdonotprintfl        = row.Field <bool>("printdonotprintfl");
            entity.printdonotprintflenabled = row.Field <bool>("printdonotprintflenabled");
            entity.editmodefl               = row.Field <bool>("editmodefl");
            entity.printfl1label            = row.IsNull("printfl1label") ? string.Empty : row.Field <string>("printfl1label");
            entity.printfl1hidden           = row.Field <bool>("printfl1hidden");
            entity.printfl1enabled          = row.Field <bool>("printfl1enabled");
            entity.printfl2label            = row.IsNull("printfl2label") ? string.Empty : row.Field <string>("printfl2label");
            entity.printfl2hidden           = row.Field <bool>("printfl2hidden");
            entity.printfl2enabled          = row.Field <bool>("printfl2enabled");
            entity.printfl3label            = row.IsNull("printfl3label") ? string.Empty : row.Field <string>("printfl3label");
            entity.printfl3hidden           = row.Field <bool>("printfl3hidden");
            entity.printfl3enabled          = row.Field <bool>("printfl3enabled");
            entity.printfl4label            = row.IsNull("printfl4label") ? string.Empty : row.Field <string>("printfl4label");
            entity.printfl4hidden           = row.Field <bool>("printfl4hidden");
            entity.printfl4enabled          = row.Field <bool>("printfl4enabled");
            entity.printfl5label            = row.IsNull("printfl5label") ? string.Empty : row.Field <string>("printfl5label");
            entity.printfl5hidden           = row.Field <bool>("printfl5hidden");
            entity.printfl5enabled          = row.Field <bool>("printfl5enabled");
            entity.requiredenabled          = row.Field <bool>("requiredenabled");
            entity.securedenabled           = row.Field <bool>("securedenabled");
            entity.modifybuttonenabled      = row.Field <bool>("modifybuttonenabled");
            entity.deletebuttonenabled      = row.Field <bool>("deletebuttonenabled");
            entity.userfield                = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }