Beispiel #1
0
        private async void buttonItem3_Click(object sender, EventArgs e)
        {
            this.Opacity = 0.5;
            AdderJop AdderJop = new AdderJop(true, null);

            if (AdderJop.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                if (await Sqldatabasethrding.SqlSaveVitl(AdderJop.jop.adder()))
                {
                    Jop.JopStatic = Jop.GetAll();
                    ClassDataGridViewDo.DataGridEnterGridForJopOption(dataGridViewX3, Jop.JopStatic);
                }
                else
                {
                    MegBox.Show("خطأ بالإتصال");
                }
            }
            this.Opacity = 1;
        }
Beispiel #2
0
        private async void dataGridViewX3_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex > -1)
            {
                AdderJop AdderJop = new AdderJop(false, Jop.JopStatic[e.RowIndex]);

                if (AdderJop.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    if (await Sqldatabasethrding.SqlSaveVitl(AdderJop.jop.updata()))
                    {
                        Jop.JopStatic = Jop.GetAll();
                        ClassDataGridViewDo.DataGridEnterGridForJopOption(dataGridViewX3, Jop.JopStatic);
                    }
                    else
                    {
                        MegBox.Show("خطأ بالإتصال");
                    }
                }
                this.Opacity = 1;
            }
        }