コード例 #1
0
        /// <summary>
        /// Gets messages for single id from USGS EDDN web stite
        /// </summary>
        /// <param name="nessid"></param>
        /// <returns></returns>
        public static MessageDataTable GetEDDNMessages(string nessid, string hoursBack = "24")
        {
            var    rval     = new MessageDataTable();
            string cgi      = "http://lrgseddn3.cr.usgs.gov/cgi-bin/fieldtest.pl";
            string postData = "DCPID=" + nessid + "&SINCE=" + hoursBack;
            var    lines    = Reclamation.Core.Web.GetPage(cgi, postData);

            for (int i = 0; i < lines.Length; i++)
            {
                string data = lines[i];
                if (data.IndexOf("<p>" + nessid) < 0)
                {
                    continue;
                }

                data = data.Replace("<p>", ""); // trim <p> tag
                data = data.Replace("</p>", "");

                var row = ParseMessage(data);
                if (row != null)
                {
                    var newRow = rval.NewMessageRow();
                    newRow.ItemArray = row.ItemArray;
                    rval.AddMessageRow(newRow);
                }
            }

            return(rval);
        }
コード例 #2
0
 private void InitClass() {
     this.DataSetName = "DataSetNbuExplorer";
     this.Prefix = "";
     this.Namespace = "http://tempuri.org/DataSetNbuExplorer.xsd";
     this.Locale = new global::System.Globalization.CultureInfo("");
     this.EnforceConstraints = true;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tableMessage = new MessageDataTable();
     base.Tables.Add(this.tableMessage);
     this.tablePhoneBook = new PhoneBookDataTable();
     base.Tables.Add(this.tablePhoneBook);
 }
コード例 #3
0
 internal MessageRow(global::System.Data.DataRowBuilder rb) : 
         base(rb) {
     this.tableMessage = ((MessageDataTable)(this.Table));
 }
コード例 #4
0
 private void InitClass() {
     this.DataSetName = "MultiXTpmDB";
     this.Prefix = "";
     this.Namespace = "http://mitug.co.il/MultiXTpmDB.xsd";
     this.Locale = new global::System.Globalization.CultureInfo("en");
     this.EnforceConstraints = false;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tableProcessClass = new ProcessClassDataTable();
     base.Tables.Add(this.tableProcessClass);
     this.tableLink = new LinkDataTable();
     base.Tables.Add(this.tableLink);
     this.tableGroup = new GroupDataTable();
     base.Tables.Add(this.tableGroup);
     this.tableMessage = new MessageDataTable();
     base.Tables.Add(this.tableMessage);
     this.tableGroupForwardFlags = new GroupForwardFlagsDataTable();
     base.Tables.Add(this.tableGroupForwardFlags);
     this.tableParam = new ParamDataTable();
     base.Tables.Add(this.tableParam);
     this.tableProcessClassLinks = new ProcessClassLinksDataTable();
     base.Tables.Add(this.tableProcessClassLinks);
     this.tableProcessClassParams = new ProcessClassParamsDataTable();
     base.Tables.Add(this.tableProcessClassParams);
     this.tableLinkParams = new LinkParamsDataTable();
     base.Tables.Add(this.tableLinkParams);
     this.tableGroupProcessClasses = new GroupProcessClassesDataTable();
     base.Tables.Add(this.tableGroupProcessClasses);
     this.tableGroupStatusProcesses = new GroupStatusProcessesDataTable();
     base.Tables.Add(this.tableGroupStatusProcesses);
     this.tableGroupStatus = new GroupStatusDataTable();
     base.Tables.Add(this.tableGroupStatus);
     this.tableProcessStatus = new ProcessStatusDataTable();
     base.Tables.Add(this.tableProcessStatus);
     this.tableUserPermissions = new UserPermissionsDataTable();
     base.Tables.Add(this.tableUserPermissions);
     global::System.Data.ForeignKeyConstraint fkc;
     fkc = new global::System.Data.ForeignKeyConstraint("MessageGroupForwardFlags", new global::System.Data.DataColumn[] {
                 this.tableMessage.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableGroupForwardFlags.MessageIDColumn});
     this.tableGroupForwardFlags.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.None;
     fkc.UpdateRule = global::System.Data.Rule.None;
     fkc = new global::System.Data.ForeignKeyConstraint("GroupGroupForwardFlags", new global::System.Data.DataColumn[] {
                 this.tableGroup.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableGroupForwardFlags.GroupIDColumn});
     this.tableGroupForwardFlags.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.None;
     fkc.UpdateRule = global::System.Data.Rule.None;
     fkc = new global::System.Data.ForeignKeyConstraint("LinkProcessClassLinks", new global::System.Data.DataColumn[] {
                 this.tableLink.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableProcessClassLinks.LinkIDColumn});
     this.tableProcessClassLinks.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.None;
     fkc.UpdateRule = global::System.Data.Rule.None;
     fkc = new global::System.Data.ForeignKeyConstraint("ProcessClassProcessClassLinks", new global::System.Data.DataColumn[] {
                 this.tableProcessClass.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableProcessClassLinks.ProcessClassIDColumn});
     this.tableProcessClassLinks.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.None;
     fkc.UpdateRule = global::System.Data.Rule.None;
     fkc = new global::System.Data.ForeignKeyConstraint("ParamProcessClassParams", new global::System.Data.DataColumn[] {
                 this.tableParam.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableProcessClassParams.ParamIDColumn});
     this.tableProcessClassParams.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.None;
     fkc.UpdateRule = global::System.Data.Rule.None;
     fkc = new global::System.Data.ForeignKeyConstraint("ProcessClassProcessClassParams", new global::System.Data.DataColumn[] {
                 this.tableProcessClass.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableProcessClassParams.ProcessClassIDColumn});
     this.tableProcessClassParams.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.None;
     fkc.UpdateRule = global::System.Data.Rule.None;
     fkc = new global::System.Data.ForeignKeyConstraint("ParamLinkParams", new global::System.Data.DataColumn[] {
                 this.tableParam.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableLinkParams.ParamIDColumn});
     this.tableLinkParams.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.None;
     fkc.UpdateRule = global::System.Data.Rule.None;
     fkc = new global::System.Data.ForeignKeyConstraint("LinkLinkParams", new global::System.Data.DataColumn[] {
                 this.tableLink.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableLinkParams.LinkIDColumn});
     this.tableLinkParams.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.None;
     fkc.UpdateRule = global::System.Data.Rule.None;
     fkc = new global::System.Data.ForeignKeyConstraint("GroupGroupProcessClasses", new global::System.Data.DataColumn[] {
                 this.tableGroup.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableGroupProcessClasses.GroupIDColumn});
     this.tableGroupProcessClasses.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.None;
     fkc.UpdateRule = global::System.Data.Rule.None;
     fkc = new global::System.Data.ForeignKeyConstraint("ProcessClassGroupProcessClasses", new global::System.Data.DataColumn[] {
                 this.tableProcessClass.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableGroupProcessClasses.ProcessClassIDColumn});
     this.tableGroupProcessClasses.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.None;
     fkc.UpdateRule = global::System.Data.Rule.None;
     fkc = new global::System.Data.ForeignKeyConstraint("ProcessStatusGroupStatusProcesses", new global::System.Data.DataColumn[] {
                 this.tableProcessStatus.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableGroupStatusProcesses.ProcessIDColumn});
     this.tableGroupStatusProcesses.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.None;
     fkc.UpdateRule = global::System.Data.Rule.None;
     fkc = new global::System.Data.ForeignKeyConstraint("GroupStatusGroupStatusProcesses", new global::System.Data.DataColumn[] {
                 this.tableGroupStatus.GroupIDColumn}, new global::System.Data.DataColumn[] {
                 this.tableGroupStatusProcesses.GroupIDColumn});
     this.tableGroupStatusProcesses.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.None;
     fkc.UpdateRule = global::System.Data.Rule.None;
     fkc = new global::System.Data.ForeignKeyConstraint("GroupGroupStatus", new global::System.Data.DataColumn[] {
                 this.tableGroup.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableGroupStatus.GroupIDColumn});
     this.tableGroupStatus.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.None;
     fkc.UpdateRule = global::System.Data.Rule.None;
     fkc = new global::System.Data.ForeignKeyConstraint("ProcessProcessStatus", new global::System.Data.DataColumn[] {
                 this.tableProcessClass.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableProcessStatus.ProcessClassIDColumn});
     this.tableProcessStatus.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.None;
     fkc.UpdateRule = global::System.Data.Rule.None;
     this.relationMessageGroupForwardFlags = new global::System.Data.DataRelation("MessageGroupForwardFlags", new global::System.Data.DataColumn[] {
                 this.tableMessage.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableGroupForwardFlags.MessageIDColumn}, false);
     this.Relations.Add(this.relationMessageGroupForwardFlags);
     this.relationGroupGroupForwardFlags = new global::System.Data.DataRelation("GroupGroupForwardFlags", new global::System.Data.DataColumn[] {
                 this.tableGroup.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableGroupForwardFlags.GroupIDColumn}, false);
     this.Relations.Add(this.relationGroupGroupForwardFlags);
     this.relationLinkProcessClassLinks = new global::System.Data.DataRelation("LinkProcessClassLinks", new global::System.Data.DataColumn[] {
                 this.tableLink.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableProcessClassLinks.LinkIDColumn}, false);
     this.Relations.Add(this.relationLinkProcessClassLinks);
     this.relationProcessClassProcessClassLinks = new global::System.Data.DataRelation("ProcessClassProcessClassLinks", new global::System.Data.DataColumn[] {
                 this.tableProcessClass.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableProcessClassLinks.ProcessClassIDColumn}, false);
     this.Relations.Add(this.relationProcessClassProcessClassLinks);
     this.relationParamProcessClassParams = new global::System.Data.DataRelation("ParamProcessClassParams", new global::System.Data.DataColumn[] {
                 this.tableParam.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableProcessClassParams.ParamIDColumn}, false);
     this.Relations.Add(this.relationParamProcessClassParams);
     this.relationProcessClassProcessClassParams = new global::System.Data.DataRelation("ProcessClassProcessClassParams", new global::System.Data.DataColumn[] {
                 this.tableProcessClass.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableProcessClassParams.ProcessClassIDColumn}, false);
     this.Relations.Add(this.relationProcessClassProcessClassParams);
     this.relationParamLinkParams = new global::System.Data.DataRelation("ParamLinkParams", new global::System.Data.DataColumn[] {
                 this.tableParam.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableLinkParams.ParamIDColumn}, false);
     this.Relations.Add(this.relationParamLinkParams);
     this.relationLinkLinkParams = new global::System.Data.DataRelation("LinkLinkParams", new global::System.Data.DataColumn[] {
                 this.tableLink.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableLinkParams.LinkIDColumn}, false);
     this.Relations.Add(this.relationLinkLinkParams);
     this.relationGroupGroupProcessClasses = new global::System.Data.DataRelation("GroupGroupProcessClasses", new global::System.Data.DataColumn[] {
                 this.tableGroup.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableGroupProcessClasses.GroupIDColumn}, false);
     this.Relations.Add(this.relationGroupGroupProcessClasses);
     this.relationProcessClassGroupProcessClasses = new global::System.Data.DataRelation("ProcessClassGroupProcessClasses", new global::System.Data.DataColumn[] {
                 this.tableProcessClass.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableGroupProcessClasses.ProcessClassIDColumn}, false);
     this.Relations.Add(this.relationProcessClassGroupProcessClasses);
     this.relationProcessStatusGroupStatusProcesses = new global::System.Data.DataRelation("ProcessStatusGroupStatusProcesses", new global::System.Data.DataColumn[] {
                 this.tableProcessStatus.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableGroupStatusProcesses.ProcessIDColumn}, false);
     this.Relations.Add(this.relationProcessStatusGroupStatusProcesses);
     this.relationGroupStatusGroupStatusProcesses = new global::System.Data.DataRelation("GroupStatusGroupStatusProcesses", new global::System.Data.DataColumn[] {
                 this.tableGroupStatus.GroupIDColumn}, new global::System.Data.DataColumn[] {
                 this.tableGroupStatusProcesses.GroupIDColumn}, false);
     this.Relations.Add(this.relationGroupStatusGroupStatusProcesses);
     this.relationGroupGroupStatus = new global::System.Data.DataRelation("GroupGroupStatus", new global::System.Data.DataColumn[] {
                 this.tableGroup.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableGroupStatus.GroupIDColumn}, false);
     this.Relations.Add(this.relationGroupGroupStatus);
     this.relationProcessProcessStatus = new global::System.Data.DataRelation("ProcessProcessStatus", new global::System.Data.DataColumn[] {
                 this.tableProcessClass.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableProcessStatus.ProcessClassIDColumn}, false);
     this.Relations.Add(this.relationProcessProcessStatus);
 }
コード例 #5
0
 internal void InitVars(bool initTable) {
     this.tableMessage = ((MessageDataTable)(base.Tables["Message"]));
     if ((initTable == true)) {
         if ((this.tableMessage != null)) {
             this.tableMessage.InitVars();
         }
     }
     this.tablePhoneBook = ((PhoneBookDataTable)(base.Tables["PhoneBook"]));
     if ((initTable == true)) {
         if ((this.tablePhoneBook != null)) {
             this.tablePhoneBook.InitVars();
         }
     }
 }
コード例 #6
0
 internal MessageRow(DataRowBuilder rb)
     : base(rb)
 {
     this.tableMessage = (MessageDataTable) this.Table;
 }
コード例 #7
0
 internal void InitVars(bool initTable) {
     this.tableProcessClass = ((ProcessClassDataTable)(base.Tables["ProcessClass"]));
     if ((initTable == true)) {
         if ((this.tableProcessClass != null)) {
             this.tableProcessClass.InitVars();
         }
     }
     this.tableLink = ((LinkDataTable)(base.Tables["Link"]));
     if ((initTable == true)) {
         if ((this.tableLink != null)) {
             this.tableLink.InitVars();
         }
     }
     this.tableGroup = ((GroupDataTable)(base.Tables["Group"]));
     if ((initTable == true)) {
         if ((this.tableGroup != null)) {
             this.tableGroup.InitVars();
         }
     }
     this.tableMessage = ((MessageDataTable)(base.Tables["Message"]));
     if ((initTable == true)) {
         if ((this.tableMessage != null)) {
             this.tableMessage.InitVars();
         }
     }
     this.tableGroupForwardFlags = ((GroupForwardFlagsDataTable)(base.Tables["GroupForwardFlags"]));
     if ((initTable == true)) {
         if ((this.tableGroupForwardFlags != null)) {
             this.tableGroupForwardFlags.InitVars();
         }
     }
     this.tableParam = ((ParamDataTable)(base.Tables["Param"]));
     if ((initTable == true)) {
         if ((this.tableParam != null)) {
             this.tableParam.InitVars();
         }
     }
     this.tableProcessClassLinks = ((ProcessClassLinksDataTable)(base.Tables["ProcessClassLinks"]));
     if ((initTable == true)) {
         if ((this.tableProcessClassLinks != null)) {
             this.tableProcessClassLinks.InitVars();
         }
     }
     this.tableProcessClassParams = ((ProcessClassParamsDataTable)(base.Tables["ProcessClassParams"]));
     if ((initTable == true)) {
         if ((this.tableProcessClassParams != null)) {
             this.tableProcessClassParams.InitVars();
         }
     }
     this.tableLinkParams = ((LinkParamsDataTable)(base.Tables["LinkParams"]));
     if ((initTable == true)) {
         if ((this.tableLinkParams != null)) {
             this.tableLinkParams.InitVars();
         }
     }
     this.tableGroupProcessClasses = ((GroupProcessClassesDataTable)(base.Tables["GroupProcessClasses"]));
     if ((initTable == true)) {
         if ((this.tableGroupProcessClasses != null)) {
             this.tableGroupProcessClasses.InitVars();
         }
     }
     this.tableGroupStatusProcesses = ((GroupStatusProcessesDataTable)(base.Tables["GroupStatusProcesses"]));
     if ((initTable == true)) {
         if ((this.tableGroupStatusProcesses != null)) {
             this.tableGroupStatusProcesses.InitVars();
         }
     }
     this.tableGroupStatus = ((GroupStatusDataTable)(base.Tables["GroupStatus"]));
     if ((initTable == true)) {
         if ((this.tableGroupStatus != null)) {
             this.tableGroupStatus.InitVars();
         }
     }
     this.tableProcessStatus = ((ProcessStatusDataTable)(base.Tables["ProcessStatus"]));
     if ((initTable == true)) {
         if ((this.tableProcessStatus != null)) {
             this.tableProcessStatus.InitVars();
         }
     }
     this.tableUserPermissions = ((UserPermissionsDataTable)(base.Tables["UserPermissions"]));
     if ((initTable == true)) {
         if ((this.tableUserPermissions != null)) {
             this.tableUserPermissions.InitVars();
         }
     }
     this.relationMessageGroupForwardFlags = this.Relations["MessageGroupForwardFlags"];
     this.relationGroupGroupForwardFlags = this.Relations["GroupGroupForwardFlags"];
     this.relationLinkProcessClassLinks = this.Relations["LinkProcessClassLinks"];
     this.relationProcessClassProcessClassLinks = this.Relations["ProcessClassProcessClassLinks"];
     this.relationParamProcessClassParams = this.Relations["ParamProcessClassParams"];
     this.relationProcessClassProcessClassParams = this.Relations["ProcessClassProcessClassParams"];
     this.relationParamLinkParams = this.Relations["ParamLinkParams"];
     this.relationLinkLinkParams = this.Relations["LinkLinkParams"];
     this.relationGroupGroupProcessClasses = this.Relations["GroupGroupProcessClasses"];
     this.relationProcessClassGroupProcessClasses = this.Relations["ProcessClassGroupProcessClasses"];
     this.relationProcessStatusGroupStatusProcesses = this.Relations["ProcessStatusGroupStatusProcesses"];
     this.relationGroupStatusGroupStatusProcesses = this.Relations["GroupStatusGroupStatusProcesses"];
     this.relationGroupGroupStatus = this.Relations["GroupGroupStatus"];
     this.relationProcessProcessStatus = this.Relations["ProcessProcessStatus"];
 }
コード例 #8
0
 private void InitClass()
 {
     this.DataSetName = "DatasetMsg";
     this.Prefix = "";
     this.Namespace = "http://tempuri.org/DatasetMsg.xsd";
     this.Locale = new System.Globalization.CultureInfo("en-US");
     this.CaseSensitive = false;
     this.EnforceConstraints = true;
     this.tableMessage = new MessageDataTable();
     this.Tables.Add(this.tableMessage);
 }
コード例 #9
0
 internal void InitVars()
 {
     this.tableMessage = (MessageDataTable) (this.Tables["Message"]);
     if (!((this.tableMessage) == null))
     {
         this.tableMessage.InitVars();
     }
 }
コード例 #10
0
 private void InitClass() {
     this.DataSetName = "Mailbox";
     this.Prefix = "";
     this.Namespace = "http://tempuri.org/Mailbox.xsd";
     this.EnforceConstraints = true;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tableConfig = new ConfigDataTable();
     base.Tables.Add(this.tableConfig);
     this.tableContact = new ContactDataTable();
     base.Tables.Add(this.tableContact);
     this.tableFolder = new FolderDataTable();
     base.Tables.Add(this.tableFolder);
     this.tableMessage = new MessageDataTable();
     base.Tables.Add(this.tableMessage);
     this.tableMessageFromContacts = new MessageFromContactsDataTable();
     base.Tables.Add(this.tableMessageFromContacts);
     this.tableMessageToContacts = new MessageToContactsDataTable();
     base.Tables.Add(this.tableMessageToContacts);
     this.tableMessageCcContacts = new MessageCcContactsDataTable();
     base.Tables.Add(this.tableMessageCcContacts);
     this.tableMessageBccContacts = new MessageBccContactsDataTable();
     base.Tables.Add(this.tableMessageBccContacts);
     this.tableContent = new ContentDataTable();
     base.Tables.Add(this.tableContent);
     global::System.Data.ForeignKeyConstraint fkc;
     fkc = new global::System.Data.ForeignKeyConstraint("FK_Folder_Message", new global::System.Data.DataColumn[] {
                 this.tableFolder.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessage.FolderIDColumn});
     this.tableMessage.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.Cascade;
     fkc.UpdateRule = global::System.Data.Rule.Cascade;
     fkc = new global::System.Data.ForeignKeyConstraint("FK_Message_MessageFromContacts", new global::System.Data.DataColumn[] {
                 this.tableMessage.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageFromContacts.MessageIDColumn});
     this.tableMessageFromContacts.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.Cascade;
     fkc.UpdateRule = global::System.Data.Rule.Cascade;
     fkc = new global::System.Data.ForeignKeyConstraint("FK_Contact_MessageFromContacts", new global::System.Data.DataColumn[] {
                 this.tableContact.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageFromContacts.ContactIDColumn});
     this.tableMessageFromContacts.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.Cascade;
     fkc.UpdateRule = global::System.Data.Rule.Cascade;
     fkc = new global::System.Data.ForeignKeyConstraint("FK_Message_MessageToContacts", new global::System.Data.DataColumn[] {
                 this.tableMessage.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageToContacts.MessageIDColumn});
     this.tableMessageToContacts.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.Cascade;
     fkc.UpdateRule = global::System.Data.Rule.Cascade;
     fkc = new global::System.Data.ForeignKeyConstraint("FK_Contact_MessageToContacts", new global::System.Data.DataColumn[] {
                 this.tableContact.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageToContacts.ContactIDColumn});
     this.tableMessageToContacts.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.Cascade;
     fkc.UpdateRule = global::System.Data.Rule.Cascade;
     fkc = new global::System.Data.ForeignKeyConstraint("FK_Message_MessageCcContacts", new global::System.Data.DataColumn[] {
                 this.tableMessage.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageCcContacts.MessageIDColumn});
     this.tableMessageCcContacts.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.Cascade;
     fkc.UpdateRule = global::System.Data.Rule.Cascade;
     fkc = new global::System.Data.ForeignKeyConstraint("FK_Contact_MessageCcContacts", new global::System.Data.DataColumn[] {
                 this.tableContact.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageCcContacts.ContactIDColumn});
     this.tableMessageCcContacts.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.Cascade;
     fkc.UpdateRule = global::System.Data.Rule.Cascade;
     fkc = new global::System.Data.ForeignKeyConstraint("FK_Message_MessageBccContacts", new global::System.Data.DataColumn[] {
                 this.tableMessage.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageBccContacts.MessageIDColumn});
     this.tableMessageBccContacts.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.Cascade;
     fkc.UpdateRule = global::System.Data.Rule.Cascade;
     fkc = new global::System.Data.ForeignKeyConstraint("FK_Contact_MessageBccContacts", new global::System.Data.DataColumn[] {
                 this.tableContact.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageBccContacts.ContactIDColumn});
     this.tableMessageBccContacts.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.Cascade;
     fkc.UpdateRule = global::System.Data.Rule.Cascade;
     fkc = new global::System.Data.ForeignKeyConstraint("FK_Message_Content", new global::System.Data.DataColumn[] {
                 this.tableMessage.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableContent.MessageIDColumn});
     this.tableContent.Constraints.Add(fkc);
     fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None;
     fkc.DeleteRule = global::System.Data.Rule.Cascade;
     fkc.UpdateRule = global::System.Data.Rule.Cascade;
     this.relationFK_Folder_Message = new global::System.Data.DataRelation("FK_Folder_Message", new global::System.Data.DataColumn[] {
                 this.tableFolder.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessage.FolderIDColumn}, false);
     this.Relations.Add(this.relationFK_Folder_Message);
     this.relationFK_Message_MessageFromContacts = new global::System.Data.DataRelation("FK_Message_MessageFromContacts", new global::System.Data.DataColumn[] {
                 this.tableMessage.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageFromContacts.MessageIDColumn}, false);
     this.Relations.Add(this.relationFK_Message_MessageFromContacts);
     this.relationFK_Contact_MessageFromContacts = new global::System.Data.DataRelation("FK_Contact_MessageFromContacts", new global::System.Data.DataColumn[] {
                 this.tableContact.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageFromContacts.ContactIDColumn}, false);
     this.Relations.Add(this.relationFK_Contact_MessageFromContacts);
     this.relationFK_Message_MessageToContacts = new global::System.Data.DataRelation("FK_Message_MessageToContacts", new global::System.Data.DataColumn[] {
                 this.tableMessage.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageToContacts.MessageIDColumn}, false);
     this.Relations.Add(this.relationFK_Message_MessageToContacts);
     this.relationFK_Contact_MessageToContacts = new global::System.Data.DataRelation("FK_Contact_MessageToContacts", new global::System.Data.DataColumn[] {
                 this.tableContact.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageToContacts.ContactIDColumn}, false);
     this.Relations.Add(this.relationFK_Contact_MessageToContacts);
     this.relationFK_Message_MessageCcContacts = new global::System.Data.DataRelation("FK_Message_MessageCcContacts", new global::System.Data.DataColumn[] {
                 this.tableMessage.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageCcContacts.MessageIDColumn}, false);
     this.Relations.Add(this.relationFK_Message_MessageCcContacts);
     this.relationFK_Contact_MessageCcContacts = new global::System.Data.DataRelation("FK_Contact_MessageCcContacts", new global::System.Data.DataColumn[] {
                 this.tableContact.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageCcContacts.ContactIDColumn}, false);
     this.Relations.Add(this.relationFK_Contact_MessageCcContacts);
     this.relationFK_Message_MessageBccContacts = new global::System.Data.DataRelation("FK_Message_MessageBccContacts", new global::System.Data.DataColumn[] {
                 this.tableMessage.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageBccContacts.MessageIDColumn}, false);
     this.Relations.Add(this.relationFK_Message_MessageBccContacts);
     this.relationFK_Contact_MessageBccContacts = new global::System.Data.DataRelation("FK_Contact_MessageBccContacts", new global::System.Data.DataColumn[] {
                 this.tableContact.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableMessageBccContacts.ContactIDColumn}, false);
     this.Relations.Add(this.relationFK_Contact_MessageBccContacts);
     this.relationFK_Message_Content = new global::System.Data.DataRelation("FK_Message_Content", new global::System.Data.DataColumn[] {
                 this.tableMessage.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableContent.MessageIDColumn}, false);
     this.Relations.Add(this.relationFK_Message_Content);
     this.relationFK_Folder_Folder = new global::System.Data.DataRelation("FK_Folder_Folder", new global::System.Data.DataColumn[] {
                 this.tableFolder.IDColumn}, new global::System.Data.DataColumn[] {
                 this.tableFolder.ParentIDColumn}, false);
     this.Relations.Add(this.relationFK_Folder_Folder);
 }
コード例 #11
0
 internal void InitVars(bool initTable) {
     this.tableConfig = ((ConfigDataTable)(base.Tables["Config"]));
     if ((initTable == true)) {
         if ((this.tableConfig != null)) {
             this.tableConfig.InitVars();
         }
     }
     this.tableContact = ((ContactDataTable)(base.Tables["Contact"]));
     if ((initTable == true)) {
         if ((this.tableContact != null)) {
             this.tableContact.InitVars();
         }
     }
     this.tableFolder = ((FolderDataTable)(base.Tables["Folder"]));
     if ((initTable == true)) {
         if ((this.tableFolder != null)) {
             this.tableFolder.InitVars();
         }
     }
     this.tableMessage = ((MessageDataTable)(base.Tables["Message"]));
     if ((initTable == true)) {
         if ((this.tableMessage != null)) {
             this.tableMessage.InitVars();
         }
     }
     this.tableMessageFromContacts = ((MessageFromContactsDataTable)(base.Tables["MessageFromContacts"]));
     if ((initTable == true)) {
         if ((this.tableMessageFromContacts != null)) {
             this.tableMessageFromContacts.InitVars();
         }
     }
     this.tableMessageToContacts = ((MessageToContactsDataTable)(base.Tables["MessageToContacts"]));
     if ((initTable == true)) {
         if ((this.tableMessageToContacts != null)) {
             this.tableMessageToContacts.InitVars();
         }
     }
     this.tableMessageCcContacts = ((MessageCcContactsDataTable)(base.Tables["MessageCcContacts"]));
     if ((initTable == true)) {
         if ((this.tableMessageCcContacts != null)) {
             this.tableMessageCcContacts.InitVars();
         }
     }
     this.tableMessageBccContacts = ((MessageBccContactsDataTable)(base.Tables["MessageBccContacts"]));
     if ((initTable == true)) {
         if ((this.tableMessageBccContacts != null)) {
             this.tableMessageBccContacts.InitVars();
         }
     }
     this.tableContent = ((ContentDataTable)(base.Tables["Content"]));
     if ((initTable == true)) {
         if ((this.tableContent != null)) {
             this.tableContent.InitVars();
         }
     }
     this.relationFK_Folder_Message = this.Relations["FK_Folder_Message"];
     this.relationFK_Message_MessageFromContacts = this.Relations["FK_Message_MessageFromContacts"];
     this.relationFK_Contact_MessageFromContacts = this.Relations["FK_Contact_MessageFromContacts"];
     this.relationFK_Message_MessageToContacts = this.Relations["FK_Message_MessageToContacts"];
     this.relationFK_Contact_MessageToContacts = this.Relations["FK_Contact_MessageToContacts"];
     this.relationFK_Message_MessageCcContacts = this.Relations["FK_Message_MessageCcContacts"];
     this.relationFK_Contact_MessageCcContacts = this.Relations["FK_Contact_MessageCcContacts"];
     this.relationFK_Message_MessageBccContacts = this.Relations["FK_Message_MessageBccContacts"];
     this.relationFK_Contact_MessageBccContacts = this.Relations["FK_Contact_MessageBccContacts"];
     this.relationFK_Message_Content = this.Relations["FK_Message_Content"];
     this.relationFK_Folder_Folder = this.Relations["FK_Folder_Folder"];
 }
コード例 #12
0
ファイル: Program.cs プロジェクト: L-A-Taxiing/ConsoleApp2
        static void Main(string[] args)
        {
            //Animals<string> lw= new Animals<string>();
            //lw.Kind = "青龙";

            //Animals<Foods> my = new Animals<Foods>();
            //my.Kind = new Foods();

            //_17Bang bang = new _17Bang();

            MessageTableAdapter adapter  = new MessageTableAdapter();
            MessageDataTable    Messages = adapter.GetData();


            adapter.DeleteQuery(10);



            //int i = 18;



            //3.getFibonacci(0, 1);

            //4.quickSort(new int[] { 23, 15, 37, 89, 2, 21, 43, 9, 56 }, 0, 8);


            //1.int a = 20, b = 18;
            //swap(ref a, ref b);
            //Console.WriteLine(a);
            //Console.WriteLine(b);


            //2.int age = 18;
            //grow(ref age);
            //Console.WriteLine(age);


            //bool input = double.TryParse(Console.ReadLine(),out double input);
            //if (double.TryParse(Console.ReadLine(), out double input))//能够parse
            //{

            //    input += 10;
            //}
            //else
            //{
            //    Console.WriteLine("输入错误...");
            //}

            //buy(3,"可乐");
            //buy(5);



            //Console.WriteLine("Ceiling:" + Math.Ceiling(19.8));//向上取整 20;
            //Console.WriteLine("Floor:" + Math.Floor(19.8));//向下取整 19;
            //Console.WriteLine("Round:" + Math.Round(19.875, 2));

            //Console.WriteLine(new Random().Next(1000));
            //Random names = new Random();
            //int output = names.Next(1, 1000);
            //int a = new Random().Next(1, 123);
        }