Exemplo n.º 1
0
 private static bool FieldsEqual(TSCVenues a, TSCVenues b)
 {
     return(
         (a.VenueKey == b.VenueKey) &&
         (a.VenueName == b.VenueName) &&
         (a.VenueEmail == b.VenueEmail) &&
         (a.VenueAddress == b.VenueAddress) &&
         (a.VenueContact == b.VenueContact) &&
         (a.VenuePhone == b.VenuePhone) &&
         (true)
         );
 }
Exemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            TSCVenues a = obj as TSCVenues;

            if (a == null)
            {
                return(false);
            }
            return(FieldsEqual(this, a));
        }
Exemplo n.º 3
0
 private void LoadTSCVenues(string xml)
 {
     gd_tscvenues = new BindingList <TSCVenues>();
     db_tscvenues = new List <TSCVenues>();
     if (xml != null && xml.Trim().Length > 0)
     {
         if (Utility.IsValidXml(xml))
         {
             XmlDocument doc = new XmlDocument();
             doc.LoadXml(xml);
             XmlNodeList nodelist = doc.SelectNodes("/Root/Data");
             if (nodelist != null)
             {
                 foreach (XmlNode node in nodelist)
                 {
                     TSCVenues tscvenues = new TSCVenues();
                     tscvenues.VenueKey     = Utility.GetXmlString(node, "VenueKey");
                     tscvenues.VenueName    = Utility.GetXmlString(node, "VenueName");
                     tscvenues.VenueEmail   = Utility.GetXmlString(node, "VenueEmail");
                     tscvenues.VenueAddress = Utility.GetXmlString(node, "VenueAddress");
                     tscvenues.VenueContact = Utility.GetXmlString(node, "VenueContact");
                     tscvenues.VenuePhone   = Utility.GetXmlString(node, "VenuePhone");
                     gd_tscvenues.Add(tscvenues);
                 }
                 foreach (TSCVenues tscvenues in gd_tscvenues)
                 {
                     db_tscvenues.Add(new TSCVenues(tscvenues));
                 }
             }
         }
         else
         {
             MessageBox.Show(xml);
         }
     }
     else
     {
     }
     dataGridViewVenues.DataSource = gd_tscvenues;
     dataGridViewVenues.Columns["VenueKey"].DataPropertyName     = "VenueKey";
     dataGridViewVenues.Columns["VenueName"].DataPropertyName    = "VenueName";
     dataGridViewVenues.Columns["VenueEmail"].DataPropertyName   = "VenueEmail";
     dataGridViewVenues.Columns["VenueAddress"].DataPropertyName = "VenueAddress";
     dataGridViewVenues.Columns["VenueContact"].DataPropertyName = "VenueContact";
     dataGridViewVenues.Columns["VenuePhone"].DataPropertyName   = "VenuePhone";
     SetHeaders();
 }