Beispiel #1
0
        private async void buttonX1_Click(object sender, EventArgs e)
        {
            if (CvTeamNeed == null)
            {
                CvTeamNeed = new CvTeamNeed(0, textBoxX1.Text);
                if (await Sqldatabasethrding.SqlSaveVitl(CvTeamNeed.adder()))
                {
                    MegBox.Show("تم الإضافة", this);
                    this.Close();
                }
                else
                {
                    MegBox.Show("هناك خطأ!", this);
                }
            }
            else
            {
                CvTeamNeed = new CvTeamNeed(CvTeamNeed.id, textBoxX1.Text);

                if (await Sqldatabasethrding.SqlSaveVitl(CvTeamNeed.updata()))
                {
                    MegBox.Show("تم تعديل", this);
                    this.Close();
                }
                else
                {
                    MegBox.Show("هناك خطأ!", this);
                }
            }
        }
Beispiel #2
0
        private async void buttonX1_Click(object sender, EventArgs e)
        {
            if (AssingDateGetWebSite.DownloadDataFromWebCliend.LoginSet(true))
            {
                try {
                    AssingDateGetWebSite.DownloadDataFromWebCliend.ENDASSINGSHOW(idAssingPHPid);

                    foreach (vitelAssingInformation vitelAssingInformation1 in Alldatesee)
                    {
                        Valuation Valuation1 = (new Valuation(0, vitelAssingInformation1.GetidInformation(), this.nameusername, vitelAssingInformation1.GetIDform(), vitelAssingInformation1.XDocumentconvert(), DateTime.Now));
                        await Sqldatabasethrding.SqlSaveVitl(Valuation1.adder());
                    }

                    this.Close();
                }
                catch (Exception ev)
                {
                    MegBox.Show(ev.Message);
                }
            }
            else
            {
                MegBox.Show("لا يوجد إنترنت");
            }
        }
        private void buttonItem2_Click(object sender, EventArgs e)
        {
            for (int n = 0; dataGridViewX1.Rows.Count - 1 > 0; n++)
            {
                #region Adder
                int      id             = 0;
                string   first_name     = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[1].Value);
                string   Last_name      = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[2].Value);
                string   Father_name    = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[3].Value);
                string   Mather_name    = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[4].Value);
                Int64    natiol_id      = ClassConvert.Convint64(dataGridViewX1.Rows[n].Cells[8].Value);
                bool     Gender         = ClassConvert.ConvBool(dataGridViewX1.Rows[n].Cells[5].Value);
                string   where_birth    = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[6].Value);
                DateTime data_barthday  = ClassConvert.ConvDateTime(dataGridViewX1.Rows[n].Cells[7].Value);
                string   e_mail         = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[18].Value);
                int      Phone_Ground   = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[20].Value);
                int      Phone_Mobile1  = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[19].Value);
                string   study          = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[9].Value);
                int      yearstudy      = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[10].Value);
                int      Id_course      = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[0].Value);
                string   Id_course_Ware = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[21].Value);
                DateTime data_regs      = ClassConvert.ConvDateTime(dataGridViewX1.Rows[n].Cells[17].Value);
                int      bitd_id        = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[11].Value);
                string   nameEnglish    = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[12].Value);
                int      Z1             = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[13].Value);
                int      z2             = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[14].Value);
                int      z3             = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[15].Value);
                string   Hanei_whare    = "";
                string   Hanei_whare1   = "";
                string   adderas        = "";

                int    Stutes_Jtma3  = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[16].Value);
                int    Phone_Mobile2 = 0;
                string Facebook      = "";
                int    whatsApp      = 0;
                int    viper         = 0;
                string Twiter        = "";

                System.Drawing.Image Image_id_nationl1 = null;
                System.Drawing.Image Image_id_nationl2 = null;
                System.Drawing.Image image             = null;
                System.Drawing.Image Image_font        = null;

                string Nkname = "";


                System.Xml.XmlDataDocument XmlHobbies = null;;

                /*
                 * string[] liststring = System.IO.Directory.GetFiles(".\\", "Hobbis1.xml", System.IO.SearchOption.AllDirectories);
                 * XmlHobbies.Load(liststring[0]);*/
                #endregion
                Vitl vitltemp = new Vitl(id, first_name, Last_name, Father_name, Mather_name, natiol_id, Gender, where_birth, data_barthday, Hanei_whare, Hanei_whare1, adderas, e_mail, Stutes_Jtma3, Phone_Ground, Phone_Mobile1, Phone_Mobile2, Facebook, Twiter, whatsApp, viper, study, yearstudy, Id_course, Id_course_Ware, data_regs, Image_id_nationl1, Image_id_nationl2, image, Image_font, bitd_id, Nkname, nameEnglish, Z1, z2, z3, XmlHobbies);

                Sqldatabasethrding.SqlSaveVitl(vitltemp.adder());
            }
        }
        private async void buttonX1_Click(object sender, EventArgs e)
        {
            if (Qustiones1 != null)
            {
                await Sqldatabasethrding.SqlSaveVitl(Qustiones1.Delete());

                this.DialogResult = DialogResult.OK;
            }
        }
Beispiel #5
0
        private async void buttonX2_Click(object sender, EventArgs e)
        {
            AdderNameForTeam AdderNameForTeam1 = new AdderNameForTeam();

            AdderNameForTeam1.NameTeam = NameTeam;
            if (AdderNameForTeam1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                await Sqldatabasethrding.SqlSaveVitl(AdderNameForTeam1.Team.adder());

                UpdateTheNewAdderOrEdit();
            }
        }
Beispiel #6
0
        private async void buttonX3_Click(object sender, EventArgs e)
        {
            try
            {
                dataGridViewX1.Enabled = false;

                ClassDataGridViewDo.ClumChekArray(NameCol, dataGridViewX1);


                int IdTheNameOfcoures = NameTeam.NameTeamStatic[comboBoxEx1.SelectedIndex].id;


                for (int i = 0; i < dataGridViewX1.Rows.Count; i++)
                {
                    int      id           = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells["id"].Value);
                    DateTime?NuberOfDayes = ClassConvert.ConvDateTimeNull(dataGridViewX1.Rows[i].Cells["تاريخ تكليفه بالعمل"].Value);

                    //أختبار هل الدورة مسجل عند الشخص + أنه تأكد من وجود ID


                    if (id > 0)
                    {
                        Team CouresNew = new Team(0, NuberOfDayes, null, id, IdTheNameOfcoures, 1, 1);

                        if (await Sqldatabasethrding.SqlSaveVitl(CouresNew.adder()))
                        {
                            dataGridViewX1.Rows[i].DefaultCellStyle.BackColor = Color.Green;
                        }
                        else
                        {
                            dataGridViewX1.Rows[i].DefaultCellStyle.BackColor = Color.Red;
                        }
                    }
                    else
                    {
                        dataGridViewX1.Rows[i].DefaultCellStyle.BackColor = Color.Red;
                    }
                }
            }
            catch (NoColumnsException ex)
            {
                ErrorClass.SaveErrorFile(ex);
                MessageBox.Show(string.Format(" لا يوجد عامود {0} ", ex.Message));
            }
            catch (Exception ex)
            {
                ErrorClass.SaveErrorFile(ex);
            }

            buttonX3.Enabled = true;

            dataGridViewX1.Enabled = true;
        }
        private async void buttonX13_Click(object sender, EventArgs e)
        {
            if (MessageBoxEx.Show(this, "هل أنت متأكد من حذف المتطوع من قاعدة البيانات نهائياً ؟؟", "حذف", MessageBoxButtons.OKCancel) == System.Windows.Forms.DialogResult.OK)
            {
                if (vitl1 != null)
                {
                    await Sqldatabasethrding.SqlSaveVitl(vitl1.Delete());

                    this.DialogResult = System.Windows.Forms.DialogResult.Abort;
                }
            }
        }
Beispiel #8
0
        private async void buttonItem3_Click(object sender, EventArgs e)
        {
            AdderCouresFor AdderCouresFor1 = new AdderCouresFor();

            if (AdderCouresFor1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                await Sqldatabasethrding.SqlSaveVitl(AdderCouresFor1.NameOfCouress1.adder());

                NameOfCouress.NameOfCouresslist = NameOfCouress.GetAll();
                ClassDataGridViewDo.DataGridEnterGridToWorkNameOfCouress_ta(dataGridViewX3, NameOfCouress.NameOfCouresslist);
            }
        }
Beispiel #9
0
        private async void buttonX2_Click(object sender, EventArgs e)
        {
            AdderTameType AdderTameType = new AdderTameType();

            if (AdderTameType.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                await Sqldatabasethrding.SqlSaveVitl(AdderTameType.NameTeamType.adder());

                NameTeamType.NameTeamTypeStatic = NameTeamType.GetAll();
                ClassDataGridViewDo.DataGridEnterGridFornameTeamTypeOption(dataGridViewX1, NameTeamType.NameTeamTypeStatic);
            }
        }
Beispiel #10
0
 private async void buttonX3_Click(object sender, EventArgs e)
 {
     if (CV_i != null)
     {
         if (MessageBoxEx.Show("هل متأكد من حذف", "تأكيد الحذف", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == System.Windows.Forms.DialogResult.Yes)
         {
             if (await Sqldatabasethrding.SqlSaveVitl(CV_i.Delete()))
             {
                 MegBox.Show("تم الحذف", this);
             }
         }
     }
 }
Beispiel #11
0
        private async void buttonItem1_Click(object sender, EventArgs e)
        {
            AdderTeamName AdderTeamName1 = new AdderTeamName(null);

            if (AdderTeamName1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                await Sqldatabasethrding.SqlSaveVitl(AdderTeamName1.NameTeam.adder());

                NameTeam.NameTeamStatic = await NameTeam.GetAll();

                ClassDataGridViewDo.DataGridEnterGridFornameTeamOption(dataGridViewX2, NameTeam.NameTeamStatic);
            }
        }
Beispiel #12
0
        private async void buttonX4_Click(object sender, EventArgs e)
        {
            AdderCouresFor AdderCouresFor1 = new AdderCouresFor();

            AdderCouresFor1.NameOfCouress1 = NameOfCouress;
            if (AdderCouresFor1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                NameOfCouress = AdderCouresFor1.NameOfCouress1;
                await Sqldatabasethrding.SqlSaveVitl(AdderCouresFor1.NameOfCouress1.updata());

                textBoxX1.Text            = NameOfCouress.Decrption;
                comboBoxEx1.SelectedIndex = ClassDataGridViewDo.RetunIndexByIdSech(NameOfCouress.Id_TypeofCouress_ta, TypeofCouress.TypeofCouressList);
            }
        }
Beispiel #13
0
 private async void dataGridViewX1_UserDeletingRow(object sender, DataGridViewRowCancelEventArgs e)
 {
     if (DevComponents.DotNetBar.MessageBoxEx.Show(this, String.Format(" هل متأكد من حذف {0} من هذا الفريق؟؟؟", e.Row.Cells[1].Value.ToString()), "رسالة تأكيد بحذف", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.OK)
     {
         if (await Sqldatabasethrding.SqlSaveVitl(this.TeamList[ClassDataGridViewDo.RetunIndexByIdSech(Convert.ToInt32(e.Row.Cells[0].Value), this.TeamList)].Delete()))
         {
             MegBox.Show("تم الحذف", this);
         }
     }
     else
     {
         e.Cancel = true;
     }
 }
Beispiel #14
0
        public async System.Threading.Tasks.Task UpdateForGetTheCV(int ToOutTeam, DateTime?ToOutDate, string Notesout)
        {
            this.ToOutTeam = ToOutTeam;

            if (ToOutDate == DateTime.MinValue)
            {
                this.ToOutDate = null;
            }
            else
            {
                this.ToOutDate = ToOutDate;
            }

            this.Notesout = Notesout;

            await Sqldatabasethrding.SqlSaveVitl(this.updata());
        }
Beispiel #15
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 #16
0
        private async void buttonItem4_Click(object sender, EventArgs e)
        {
            this.Opacity = 0.5;
            AdderWereType AdderWereType = new AdderWereType(true, null);

            if (AdderWereType.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                if (await Sqldatabasethrding.SqlSaveVitl(AdderWereType.WereType.adder()))
                {
                    WereType.WereTypeList = WereType.GetAll();
                    ClassDataGridViewDo.DataGridEnterGridForWereTypeOption(dataGridViewX5, WereType.WereTypeList);
                }
                else
                {
                    MegBox.Show("خطأ بالإتصال");
                }
            }
            this.Opacity = 1;
        }
        private async void buttonX1_Click(object sender, EventArgs e)
        {
            if (textBoxX1.Text != "" && comboBoxEx1.SelectedIndex != -1)
            {
                TypeofCouress Type1 = new TypeofCouress(0, textBoxX1.Text, NameTeam.NameTeamStatic[comboBoxEx1.SelectedIndex].id);

                if (await Sqldatabasethrding.SqlSaveVitl(Type1.adder()))
                {
                    this.DialogResult = System.Windows.Forms.DialogResult.OK;
                }
                else
                {
                }
            }
            else
            {
                MegBox.Show("أحد الحقول فارغه");
            }
        }
Beispiel #18
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;
            }
        }
Beispiel #19
0
 private async void buttonX1_Click(object sender, EventArgs e)
 {
     if (Scileis == null)
     {
         Scileis = new Scileis(0, textBoxX1.Text);
         if (await Sqldatabasethrding.SqlSaveVitl(Scileis.adder()))
         {
             MegBox.Show("تم إضافة", this);
             this.Close();
         }
     }
     else
     {
         Scileis = new Scileis(Scileis.id, textBoxX1.Text);
         if (await Sqldatabasethrding.SqlSaveVitl(Scileis.updata()))
         {
             MegBox.Show("تم التعديل", this);
             this.Close();
         }
     }
 }
Beispiel #20
0
        private async void dataGridViewX2_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex > -1)
            {
                AdderTeamName AdderTeamName = new AdderTeamName(NameTeam.NameTeamStatic[ClassDataGridViewDo.RetunIndexByIdSech(Convert.ToInt32(dataGridViewX2.Rows[e.RowIndex].Cells[0].Value), NameTeam.NameTeamStatic)]);

                if (AdderTeamName.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    if (await Sqldatabasethrding.SqlSaveVitl(AdderTeamName.NameTeam.updata()))
                    {
                        NameTeam.NameTeamStatic = await NameTeam.GetAll();

                        ClassDataGridViewDo.DataGridEnterGridFornameTeamOption(dataGridViewX2, NameTeam.NameTeamStatic);
                    }
                    else
                    {
                        MegBox.Show("خطأ بالإتصال");
                    }
                }
                this.Opacity = 1;
            }
        }
Beispiel #21
0
        private async void dataGridViewX1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                AdderNameForTeam EditTame = new AdderNameForTeam();


                this.Opacity      = 0.5;
                EditTame.NameTeam = NameTeam;
                EditTame.Team     = TeamList[ClassDataGridViewDo.RetunIndexByIdSech(ClassConvert.Convint(dataGridViewX1.Rows[e.RowIndex].Cells[0].Value), TeamList)];
                if (EditTame.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    await Sqldatabasethrding.SqlSaveVitl(EditTame.Team.updata());


                    UpdateTheNewAdderOrEdit();
                }


                this.Opacity = 1;
            }
        }
        private async void buttonX1_Click(object sender, EventArgs e)
        {
            if (CV_Study == null)
            {
                if (await CV_Study.CV_studyID(textBoxX2.Text.Trim()) == -1)
                {
                    CV_Study = new CV_Study(0, textBoxX1.Text, textBoxX2.Text.Trim());


                    if (await Sqldatabasethrding.SqlSaveVitl(CV_Study.adder()))
                    {
                        MegBox.Show("تم الإضافة", this);
                    }
                    else
                    {
                        MegBox.Show("خطأ ", this);
                    }
                }
                else
                {
                    MegBox.Show("الرمز موجود!");
                }
            }
            else
            {
                CV_Study = new CV_Study(CV_Study.id, textBoxX1.Text, textBoxX2.Text);


                if (await Sqldatabasethrding.SqlSaveVitl(CV_Study.updata()))
                {
                    MegBox.Show("تم الإضافة", this);
                }
                else
                {
                    MegBox.Show("خطأ ", this);
                }
            }
        }
        private async void buttonX2_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(textBoxX1.Text))
            {
                MegBox.Show("يجب أدخال", this);
                return;
            }

            if (Qustiones1 == null)
            {
                Qustiones1 = new Qustiones(0, textBoxX1.Text);

                await Sqldatabasethrding.SqlSaveVitl(Qustiones1.adder());

                this.DialogResult = DialogResult.OK;
            }
            else
            {
                Qustiones1 = new Qustiones(Qustiones1.id, textBoxX1.Text);
                await Sqldatabasethrding.SqlSaveVitl(Qustiones1.updata());

                this.DialogResult = DialogResult.OK;
            }
        }
        public async void ForRunThrading()
        {
            try
            {
                dataGridViewX1.Enabled = false;

                ClassDataGridViewDo.ClumChekArray(NameCol, dataGridViewX1);
                progressBarX1.Maximum = dataGridViewX1.Rows.Count;
                int       IndexCombox = comboBoxEx1.SelectedIndex;
                Stopwatch stopwatch   = new Stopwatch();

                stopwatch.Start();
                for (int i = 0; i < dataGridViewX1.Rows.Count; i++)
                {
                    stopwatch.Restart();
                    // إيقاف العمل في خلفية التزامن
                    if (!Workin)
                    {
                        break;
                    }
                    //العداد
                    progressBarX1.Value = i;
                    // إنتظار بين الأمر والثاني
                    await System.Threading.Tasks.Task.Delay(100);



                    int   id             = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells["id"].Value);
                    int   NumberOfCoures = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells["رقم الدورة"].Value);
                    int?  NuberOfDayes   = ClassConvert.ConvintNull(dataGridViewX1.Rows[i].Cells["عدد الأيام"].Value);
                    float?float1         = ClassConvert.ConvFloatNull(dataGridViewX1.Rows[i].Cells["النتيجة"].Value);
                    //أختبار هل الدورة مسجل عند الشخص + أنه تأكد من وجود ID
                    if (!await Couress.GetIsItHaveCouresByIdInformation(id, IndexCombox))
                    {
                        if (id > 0 && NumberOfCoures > 0 && NuberOfDayes != null && float1 != null)
                        {
                            int IdTheNameOfcoures = NameOfCouress.SerchByListStaticRetId(TypeofCouress.TypeofCouressList[IndexCombox].id, NumberOfCoures);
                            if (IdTheNameOfcoures == -1)
                            {
                                DevComponents.DotNetBar.MessageBoxEx.Show("رقم الدورة غير مضاف:" + NumberOfCoures);
                                break;
                            }


                            Couress CouresNew = new Couress(0, IdTheNameOfcoures, id, (int)NuberOfDayes, (float)float1);
                            await Sqldatabasethrding.SqlSaveVitl(CouresNew.adder());

                            dataGridViewX1.Rows[i].DefaultCellStyle.BackColor = Color.Green;
                        }
                        else
                        {
                            dataGridViewX1.Rows[i].DefaultCellStyle.BackColor = Color.Red;
                        }
                    }
                    else
                    {
                        dataGridViewX1.Rows[i].DefaultCellStyle.BackColor = Color.Yellow;
                    }

                    labelX2.Text = ((stopwatch.ElapsedMilliseconds * (dataGridViewX1.Rows.Count - i)) / 1000).ToString();
                }
            }
            catch (NoColumnsException ex)
            {
                ErrorClass.SaveErrorFile(ex);
                MessageBox.Show(string.Format(" لا يوجد عامود {0} ", ex.Message));
            }
            catch (Exception ex)
            {
                ErrorClass.SaveErrorFile(ex);
            }

            buttonX3.Enabled       = true;
            Workin                 = false;
            dataGridViewX1.Enabled = true;
        }
Beispiel #25
0
        private async void buttonX1_Click(object sender, EventArgs e)
        {
            DateTime?DateTimenull = ClassConvert.ConvDateTimeNull(dateTimeInput1.Value);

            if (CV_i == null)
            {
                if (comboBoxEx1.SelectedIndex == -1)
                {
                    MegBox.Show("لا يمكن ترك حقل دراسه فارغ");
                    return;
                }
                else if (textBoxX1.Text.Trim() == "")
                {
                    MegBox.Show("لا يمكن ترك حقل الأسم فارغ");
                    return;
                }
                else if (integerInput1.Value == 0)
                {
                    MegBox.Show("لا يمكن ترك حقل رقم الهاتف فارغ");
                    return;
                }
                else if (!ClassConvert.IsNumberPhoneMobileOrGrund(integerInput1.Value))
                {
                    MegBox.Show("لا يمكن ترك حقل رقم الهاتف فارغ");
                    return;
                }



                int Idc = CV_Study.CV_StudyList[comboBoxEx1.SelectedIndex].id;

                int Idc1 = -1;
                int Idc2 = -1;
                if (comboBoxEx3.SelectedIndex != -1)
                {
                    Idc1 = CvTeamNeed.CvTeamNeedList[comboBoxEx3.SelectedIndex].id;
                }

                if (comboBoxEx4.SelectedIndex != -1)
                {
                    Idc2 = CvTeamNeed.CvTeamNeedList[comboBoxEx4.SelectedIndex].id;
                }

                CV_i = new CV_Info(0, textBoxX1.Text, textBoxX2.Text, await CV.GetTheNumberArchev(Idc), Idc, comboBoxEx2.SelectedIndex, integerInput1.Value, dateTimeInput1.Value, Idc1, checkBoxX1.Checked, comboBoxEx4.SelectedIndex, ClassConvert.ConvDateTimeNull(dateTimeInput2.Value), textBoxX3.Text);
                int idc = await Sqldatabasethrding.SqlSaveAdderAndBack(CV_i.adder());

                if (idc > 0)
                {
                    MegBox.Show("تم التسجيل", this);
                    labelX4.Text = CV_i.GetCodeArch();
                    CV_i         = new CV_Info(idc, textBoxX1.Text, textBoxX2.Text, await CV.GetTheNumberArchev(Idc), Idc, comboBoxEx2.SelectedIndex, integerInput1.Value, dateTimeInput1.Value, Idc1, checkBoxX1.Checked, Idc2, ClassConvert.ConvDateTimeNull(dateTimeInput2.Value), textBoxX3.Text);
                    foreach (HaveScil item in listHavescil)
                    {
                        item.EditCV_Info_ID(CV_i.id);
                    }
                    Sqldatabasethrding.SqlAddOrUpdateOrDelet(ClassConvert.ConvertListInterfaseToDataBase(this.listHavescil), IntAddeHavescilr, InteditHavescil, IntDelHavescil);
                }
                else
                {
                    MegBox.Show("هناك خطأ في الاتصال", this);
                }
            }
            else
            {
                CV_i = new CV_Info(CV_i.id, textBoxX1.Text, textBoxX2.Text, (CV_i.Id_Study == CV_Study.CV_StudyList[comboBoxEx1.SelectedIndex].id ? CV_i.NmuberOfArchev: await CV.GetTheNumberArchev(CV_Study.CV_StudyList[comboBoxEx1.SelectedIndex].id)),
                                   CV_Study.CV_StudyList[comboBoxEx1.SelectedIndex].id,
                                   comboBoxEx2.SelectedIndex,
                                   integerInput1.Value,
                                   DateTimenull,
                                   comboBoxEx3.SelectedIndex != -1 ?    CvTeamNeed.CvTeamNeedList[comboBoxEx3.SelectedIndex].id : -1,
                                   checkBoxX1.Checked,
                                   comboBoxEx4.SelectedIndex != -1 ? CvTeamNeed.CvTeamNeedList[comboBoxEx4.SelectedIndex].id : -1, ClassConvert.ConvDateTimeNull(dateTimeInput2.Value), textBoxX3.Text
                                   );
                if (await Sqldatabasethrding.SqlSaveVitl(CV_i.updata()))
                {
                    labelX4.Text = CV_i.GetCodeArch();
                    MegBox.Show("تم التعديل", this);
                    Sqldatabasethrding.SqlAddOrUpdateOrDelet(ClassConvert.ConvertListInterfaseToDataBase(this.listHavescil), IntAddeHavescilr, InteditHavescil, IntDelHavescil);
                }
                else
                {
                    MegBox.Show("هناك خطأ في الاتصال", this);
                }
            }
        }