Exemple #1
0
 private void mnuDelete_Click(object sender, EventArgs e)
 {
     Action = AppAction.Delete;
     InitialiseAction();
     using (var form = new FrmList("Services", "List of Services"))
     {
         var result = form.ShowDialog();
         if (result == DialogResult.OK)
         {
             LoadService(Convert.ToInt32(form.ReturnValue));
         }
     }
 }
Exemple #2
0
        private void cmdClient_Click(object sender, EventArgs e)
        {
            using (var form = new FrmList("Clients", "List of Clients"))
            {
                var result = form.ShowDialog();
                if (result == DialogResult.OK)
                {
                    tRefNo.Text          = form.ReturnValue.ToString();
                    tClientsDetails.Text = form.ReturnValue1.ToString() + " (" + form.ReturnValue2.ToString() + ")";
                    ClientOutline        = form.ReturnValue3.ToString();

                    GetSubLevel(tRefNo.Text);
                    tRewardBalance.Text = MyModules.FormatDouble(GetClientReward(tRefNo.Text));
                    tServiceValue_TextChanged(sender, e);
                }
            }
        }
        private void dataGridViewJobs_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            var senderGrid = (DataGridView)sender;

            dataGridViewJobs.Tag = e.RowIndex;

            if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex >= 0)
            {
                if (senderGrid.Columns[e.ColumnIndex].Name == "JobCommand")
                {
                    using (var form = new FrmList("Contracts", "List of Contracts"))
                    {
                        var result = form.ShowDialog();
                        if (result == DialogResult.OK)
                        {
                            FillContract(Convert.ToInt16(form.ReturnValue), e.RowIndex);
                        }
                    }
                }
            }
        }