Inheritance: Queue.UI.WinForms.DependencyForm
Example #1
0
        private void addButton_Click(object sender, EventArgs e)
        {
            using (var f = new EditClientForm())
            {
                DataGridViewRow row = null;

                f.Saved += (s, eventArgs) =>
                {
                    if (row == null)
                    {
                        row = clientsGridView.Rows[clientsGridView.Rows.Add()];
                        row.Selected = true;
                    }
                    ClientsGridViewRenderRow(row, f.Client);
                    f.Close();
                };

                f.ShowDialog();
            }
        }
 private void clientEditLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     using (var f = new EditClientForm(clientRequest.Client.Id))
     {
         if (f.ShowDialog() == DialogResult.OK)
         {
             clientTextBlock.Text = f.Client.ToString();
         }
     }
 }
Example #3
0
        private void clientsGridView_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                var row = clientsGridView.Rows[e.RowIndex];
                Client client = row.Tag as Client;

                using (var f = new EditClientForm(client.Id))
                {
                    f.Saved += (s, eventArgs) =>
                    {
                        ClientsGridViewRenderRow(row, f.Client);
                        f.Close();
                    };

                    f.ShowDialog();
                }
            }
        }