private void loadToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Shop.Load();
     ClientBindingSource.ResetBindings(false);
     ForSaleBindingSource.ResetBindings(false);
     Shop.IsDirty = false;
 }
        private void button1_Click_1(object sender, EventArgs e)
        {
            int n = Shop.Warehouse.Count;

            Shop.DateCheck();
            if (Shop.Warehouse.Count > n)
            {
                ForSaleBindingSource.ResetBindings(false);
                ClientBindingSource.ResetBindings(false);
            }
        }
 private void BanButton_Click(object sender, EventArgs e)
 {
     try
     {
         Client client = Shop.SearchClient((string)ClientsGrid.SelectedRows[0].Cells[1].Value);
         foreach (var dep in Shop.Deposits)
         {
             if (dep.Client == client)
             {
                 dep.DateTimeBuyOut = dep.DateTime;
             }
         }
         DateCheck.PerformClick();
         Shop.BannedUsers.Add(client.Email);
         Shop.Clients.Remove(client);
         ClientBindingSource.ResetBindings(false);
     }
     catch
     {
     }
 }