Example #1
0
 public DataControl(Data dtToShow)
 {
     InitializeComponent();
     this.tbPass.Text = dtToShow.Pass;
     this.tbSite.Text = dtToShow.Site;
     this.tbUser.Text = dtToShow.User;
 }
Example #2
0
        public void UpdateOrAdd(Data DataToAddOrUpdate)
        {
            try
            {
                Data dtToRemove =
                    this.AllData.Single(x => x.Site == DataToAddOrUpdate.Site && x.User == DataToAddOrUpdate.User);
                this.AllData.Remove(dtToRemove);
            }
            catch
            {

            }
            finally
            {
                this.AllData.Add(DataToAddOrUpdate);
            }
        }