Exemple #1
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            if (CouressEdit == null && ToAddInCores == false)
            {
                CouressEdit = new Couress(CountOfNew, EditTame.SerchByComBBox(comboBoxEx2, NameOfCouress.NameOfCouresslist), this.idVite, ClassConvert.Convint(NumberOfdayregest.Text), Convert.ToSingle(Result.Text));
                CountOfNew--;
                this.DialogResult = System.Windows.Forms.DialogResult.Yes;
            }

            else if (CouressEdit == null && ToAddInCores && comboBoxEx1.AutoCompleteCustomSource.IndexOf(comboBoxEx1.Text) != -1)
            {
                CouressEdit = new Couress(CountOfNew, this.idVite, intList[comboBoxEx1.AutoCompleteCustomSource.IndexOf(comboBoxEx1.Text)], ClassConvert.Convint(NumberOfdayregest.Text), Convert.ToSingle(Result.Text));
                CountOfNew--;
                this.DialogResult = System.Windows.Forms.DialogResult.Yes;
            }
            else if (ToAddInCores == false)
            {
                CouressEdit.Eidt(EditTame.SerchByComBBox(comboBoxEx2, NameOfCouress.NameOfCouresslist), this.idVite, ClassConvert.Convint(NumberOfdayregest.Text), Convert.ToSingle(Result.Text));
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
            }
            else if (ToAddInCores && comboBoxEx1.AutoCompleteCustomSource.IndexOf(comboBoxEx1.Text) != -1)
            {
                CouressEdit.Eidt(intList[comboBoxEx1.SelectedIndex], this.idVite, ClassConvert.Convint(NumberOfdayregest.Text), Convert.ToSingle(Result.Text));
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
            }

            this.Close();
        }
        /// <summary>
        /// البحث في قاعدة البيانات عن طريق ID
        /// </summary>
        ///

        public static async void WaitSqlDowork(int idname, DevComponents.DotNetBar.Controls.ProgressBarX ProgressBarX1, List <Vitl> VitlList)
        {
            SqlConnection SqlConnection1 = new SqlConnection();

            SqlConnection1.ConnectionString = sqlconction;
            await SqlConnection1.OpenAsync();

            ProgressBarX1.Value = 50;
            SqlCommand sqlcom1 = new SqlCommand("select id, first_name + Last_name AS Fullname , natiol_id  from Information_Ta", SqlConnection1);

            IAsyncResult result = sqlcom1.BeginExecuteReader();

            SqlDataReader reader = sqlcom1.EndExecuteReader(result);

            try
            {
                while (await reader.ReadAsync())
                {
                    int    id       = Convert.ToInt32(reader.GetValue(0));
                    string Fullname = Convert.ToString(reader.GetValue(1));

                    Int64 idnationl = ClassConvert.Convint64(reader.GetValue(2));
                }
            }
            catch
            {
                MessageBox.Show("Error");
            }

            finally
            {
                reader.Close();
            }
        }
        public static async void DataGridEnterGridForCV_InfoCV(DevComponents.DotNetBar.Controls.DataGridViewX Grid, List <CV_Info> TeamClassList)
        {
            Grid.BeginInvoke((Action)(() => { Grid.Rows.Clear();


                                              ///Id_TypeofCouress_ta.Items[RetunIndexByIdSech(TeamClassList[i].Id_TypeofCouress_ta, TypeofCouress.TypeofCouressList)]

                                              for (int i = 0; i < TeamClassList.Count; i++)
                                              {
                                                  //     try
                                                  //    {
                                                  Grid.Rows.Add(
                                                      TeamClassList[i].id,
                                                      TeamClassList[i].FullName,
                                                      TeamClassList[i].Notes,
                                                      TeamClassList[i].GetCodeArch(),
                                                      TeamClassList[i].Id_Study != -1 ? CV_Study.CV_StudyList[ClassDataGridViewDo.RetunIndexByIdSech(TeamClassList[i].Id_Study, CV_Study.CV_StudyList)].Sutdy : "",
                                                      ClassConvert.ConvNumberCombyereToString(TeamClassList[i].Year_sutr),
                                                      TeamClassList[i].Numberphone,
                                                      TeamClassList[i].Date != null ? TeamClassList[i].Date.Value.ToShortDateString() : "",
                                                      TeamClassList[i].ID_TemaNeed != -1 ? CvTeamNeed.CvTeamNeedList[ClassDataGridViewDo.RetunIndexByIdSech(TeamClassList[i].ID_TemaNeed, CvTeamNeed.CvTeamNeedList)].FullName : "",
                                                      TeamClassList[i].Bit);
                                              }
                                      }));

            //     }
            //    catch( Exception e )
            //       { ErrorClass.SaveErrorFile(e); }
        }
        private async void buttonX2_Click(object sender, EventArgs e)
        {
            if (!dataGridViewX1.Columns.Contains("تاريخ1"))
            {
                dataGridViewX1.Columns.Add("تاريخ1", "تاريخ");
            }

            if (!dataGridViewX1.Columns.Contains("تاريخ2"))
            {
                dataGridViewX1.Columns.Add("تاريخ2", "تاريخ");
            }

            if (!dataGridViewX1.Columns.Contains("الاسم1"))
            {
                dataGridViewX1.Columns.Add("الاسم1", "تاريخ");
            }

            for (int i = 0; i < dataGridViewX1.Rows.Count; i++)
            {
                if (ClassConvert.Convint(dataGridViewX1.Rows[i].Cells["id"].Value) > 0)
                {
                    IdAndName vit = await Vitl.GetbyidIdAndName(ClassConvert.Convint(dataGridViewX1.Rows[i].Cells["id"].Value));

                    dataGridViewX1.Rows[i].Cells["الاسم1"].Value = vit.Name;
                    dataGridViewX1.Rows[i].Cells["تاريخ1"].Value = vit.Regesterdeg.ToShortDateString();

                    dataGridViewX1.Rows[i].Cells["تاريخ2"].Value = vit.Regesterdeg.ToLongDateString();
                }
            }
        }
Exemple #5
0
        public static List <Team> GetByGetbyIdNameName(int id, bool Ative)
        {
            List <Team> Lista      = new List <Team>();
            string      sqlCommand = "SELECT [Id],[date_Start] ,[Date_End],[ID_informtion],[id_NameTeam_Ta],[Id_Jop_Ta] ,[Setewation],[Delete] FROM [HR_SARC].[dbo].[Team_ta] where [Delete] = 0 and [id_NameTeam_Ta] = @id ";

            if (Ative)
            {
                sqlCommand += " And ( [Date_End] is null ) ";
                for (int i = 0; i < Team.ListNotAllAtive.Count; i++)
                {
                    sqlCommand += "  And [Setewation] !=" + Team.ListNotAllAtive[i].ToString();
                }
            }
            System.Data.SqlClient.SqlCommand SqlComm = new System.Data.SqlClient.SqlCommand(sqlCommand);
            SqlComm.Parameters.AddWithValue("@id", id);


            Task <List <List <object> > > temp = Sqldatabasethrding.GetSql(SqlComm);

            while (!temp.IsCompleted)
            {
            }

            List <List <object> > Adw = temp.Result;

            for (int i = 0; i < Adw.Count; i++)
            {
                if (Adw[i].Count != 0)
                {
                    Lista.Add(new Team(Convert.ToInt32(Adw[i][0]), ClassConvert.ConvDateTimeNull(Adw[i][1]), ClassConvert.ConvDateTimeNull(Adw[i][2]), Convert.ToInt32(Adw[i][3]), Convert.ToInt32(Adw[i][4]), Convert.ToInt32(Adw[i][5]), Convert.ToInt32(Adw[i][6])));
                }
            }

            return(Lista);
        }
        private void AdderNameForTeam_Load(object sender, EventArgs e)
        {
            ClassDataGridViewDo.DataGridAddVuleComBoxEx(comboBoxEx3, Jop.JopStatic);
            ClassDataGridViewDo.DataGridAddVuleComBoxEx(comboBoxEx2, Team.Setwation);
            intList = RibbonForm1.intList;
            textBoxX1.AutoCompleteCustomSource = RibbonForm1.Combox;
            textBoxX1.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
            textBoxX1.AutoCompleteSource       = AutoCompleteSource.CustomSource;
            if (Team == null)
            {
                buttonX1.Text = "إضافة";
            }
            else
            {
                textBoxX1.Text            = RibbonForm1.Combox[intList.IndexOf(Team.ID_informtion)];
                comboBoxEx2.SelectedIndex = Team.Setewation;
                comboBoxEx3.SelectedIndex = ClassDataGridViewDo.RetunIndexByIdSech(Team.Id_Jop_Ta, Jop.JopStatic);
                if (ClassConvert.ConvDateTimeNull(Team.date_Start) != null)
                {
                    dateTimeInput1.Value = ClassConvert.ConvDateTime(Team.date_Start);
                }

                if (ClassConvert.ConvDateTimeNull(Team.Date_End) != null)
                {
                    dateTimeInput2.Value = ClassConvert.ConvDateTime(Team.Date_End);
                }

                buttonX1.Text = "تعديل";
            }
        }
Exemple #7
0
        private void buttonX2_Click(object sender, EventArgs e)
        {
            if (!dataGridViewX1.Columns.Contains("id"))
            {
                dataGridViewX1.Columns.Add("Id", "id");
            }

            for (int i = 0; i < dataGridViewX1.Rows.Count; i++)
            {
                if (ClassConvert.Convint(dataGridViewX1.Rows[i].Cells["id"].Value) <= 0)
                {
                    string name = Convert.ToString(dataGridViewX1.Rows[i].Cells["الاسم"].Value);

                    SerchNameBynameRetu SerchNameBynameRetu = new SerchNameBynameRetu();

                    SerchNameBynameRetu.sech = name;
                    SerchNameBynameRetu.DoWorkOff();

                    if (SerchNameBynameRetu.Id > 0)
                    {
                        dataGridViewX1.Rows[i].Cells["id"].Value = SerchNameBynameRetu.Id;
                    }
                    else
                    {
                        SerchNameBynameRetu.Text = name;
                        if (SerchNameBynameRetu.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                        {
                            dataGridViewX1.Rows[i].Cells["id"].Value = SerchNameBynameRetu.Id;
                        }
                    }
                }
            }
        }
        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());
            }
        }
Exemple #9
0
        private void buttonX3_Click_1(object sender, EventArgs e)
        {
            if (!dataGridViewX1.Columns.Contains("موجودأم لا"))
            {
                dataGridViewX1.Columns.Add("موجودأم لا", "موجودأم لا");
            }

            for (int i = 0; i < dataGridViewX1.Rows.Count - 1; i++)
            {
                progressBarX1.BeginInvoke(new Prosser(NewProsserVaul), i);

                if (ClassConvert.Convint64(dataGridViewX1.Rows[i].Cells[listStringNkname2[4]].Value) > 0)
                {
                    if (Vitl.GetIf(ClassConvert.Convint64(dataGridViewX1.Rows[i].Cells[listStringNkname2[4]].Value)))
                    {
                        dataGridViewX1.Rows[i].Cells["موجودأم لا"].Value = "غير موجود رقم وطني";
                        goto end;
                    }
                    else
                    {
                        dataGridViewX1.Rows[i].Cells["موجودأم لا"].Value = "موجود رقم وطني";
                        goto end;
                    }
                }

                if (Convert.ToString(dataGridViewX1.Rows[i].Cells[listStringNkname2[11]].Value) != "")
                {
                    if (Vitl.GetIfEmail(Convert.ToString(dataGridViewX1.Rows[i].Cells[listStringNkname2[11]].Value)))
                    {
                        dataGridViewX1.Rows[i].Cells["موجودأم لا"].Value = "غير موجود Email";
                        goto end;
                    }
                    else
                    {
                        dataGridViewX1.Rows[i].Cells["موجودأم لا"].Value = " موجود Email";
                        goto end;
                    }
                }

                if (ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname2[14]].Value) != 0)
                {
                    if (Vitl.GetIfmobilephon(ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname2[11]].Value)))
                    {
                        dataGridViewX1.Rows[i].Cells["موجودأم لا"].Value = " غير موجود رقم هاتف";
                        goto end;
                    }
                    else
                    {
                        dataGridViewX1.Rows[i].Cells["موجودأم لا"].Value = "موجود رقم هاتف";
                        goto end;
                    }
                }

                dataGridViewX1.Rows[i].Cells["موجودأم لا"].Value = "لا يوجد وسيلة تحقق أبدا";
                end :;
            }
        }
Exemple #10
0
 private void dataGridViewX1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0)
     {
         RibbonForm2 Detalis1 = new RibbonForm2();
         this.Opacity    = 0.5;
         Detalis1.idvite = ClassConvert.Convint(dataGridViewX1.Rows[e.RowIndex].Cells[0].Value);
         Detalis1.ShowDialog();
         this.Opacity = 1;
     }
 }
 public static void DataGridEnterGridToWorkTeam(DevComponents.DotNetBar.Controls.DataGridViewX Grid, List <Team> TeamClassList, List <IdAndName> nameInfrma)
 {
     Grid.Rows.Clear();
     DevComponents.DotNetBar.Controls.DataGridViewComboBoxExColumn Id_Jop_Ta  = (DevComponents.DotNetBar.Controls.DataGridViewComboBoxExColumn)Grid.Columns["Id_Jop_Ta"];
     DevComponents.DotNetBar.Controls.DataGridViewComboBoxExColumn Setewation = (DevComponents.DotNetBar.Controls.DataGridViewComboBoxExColumn)Grid.Columns["Setewation"];
     ///Id_Jop_Ta.Items[RetunIndexByIdSech(TeamClassList[i].Id_TypeofCouress_ta, TypeofCouress.TypeofCouressList)]
     for (int i = 0; i < TeamClassList.Count; i++)
     {
         Grid.Rows.Add(TeamClassList[i].id, nameInfrma[i].Name, ClassConvert.ConvertTostringDateOrNull(TeamClassList[i].date_Start), ClassConvert.ConvertTostringDateOrNull(TeamClassList[i].Date_End), Id_Jop_Ta.Items[RetunIndexByIdSech(TeamClassList[i].Id_Jop_Ta, Jop.JopStatic)], Setewation.Items[TeamClassList[i].Setewation]);
     }
 }
Exemple #12
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;
        }
Exemple #13
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            Sqldatabasethrding.SqlAddOrUpdateOrDelet(ClassConvert.ConvertListInterfaseToDataBase(CouressList), IntAdderCoress, IntEditCoress, IntDeletCoress);
            CouressList = Couress.GetByNameOfCores(NameOfCouress.id);
            VitlByIdList.Clear();
            foreach (Couress Couressv in CouressList)
            {
                VitlByIdList.Add(Vitl.VitlIdAndName(Couressv.Id_Information));
            }

            ClassDataGridViewDo.DataGridEnterGridToWorkNameOfCouress_ta(dataGridViewX1, CouressList, VitlByIdList);
        }
Exemple #14
0
        private void dataGridViewX1_UserDeletingRow(object sender, DataGridViewRowCancelEventArgs e)
        {
            if (Convert.ToInt32(e.Row.Cells["Idcours"].Value) <= 0)
            {
                e.Cancel = true;
            }

            else
            {
                IntDeletCoress.Add(ClassDataGridViewDo.RetunIndexByIdSech(ClassConvert.Convint(e.Row.Cells["Idcours"].Value), CouressList));
            }
        }
Exemple #15
0
 private void buttonX3_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < dataGridViewX1.Rows.Count; i++)
     {
         if (ClassConvert.Convint(dataGridViewX1.Rows[i].Cells["id"].Value) > 0)
         {
             if (ClassConvert.ConvString(dataGridViewX1.Rows[i].Cells["التاريخ"].Value) != "")
             {
                 Vitl.EditbyIdRegInSARC(ClassConvert.Convint(dataGridViewX1.Rows[i].Cells["id"].Value), ClassConvert.ConvDateTime(dataGridViewX1.Rows[i].Cells["التاريخ"].Value));
             }
         }
     }
 }
Exemple #16
0
        private void SaveMyVitlNew(int i)
        {
            int j = 0;

            int      id             = 0;
            string   first_name     = dataGridViewX1.Rows[i].Cells[listStringNkname1[j]].Value.ToString();
            string   Last_name      = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            string   Father_name    = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            string   Mather_name    = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            Int64    natiol_id      = ClassConvert.Convint64(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            bool?    Gender         = ClassConvert.ConvBoolMelaFemalNUll(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            string   where_birth    = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            DateTime data_barthday  = ClassConvert.ConvDateTime(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            string   Hanei_whare    = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            string   Hanei_whare1   = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            string   adderas        = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            string   e_mail         = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            int      Stutes_Jtma3   = ClassConvert.ConvToStatesF(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            int      Phone_Ground   = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            int      Phone_Mobile1  = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            int      Phone_Mobile2  = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            string   Facebook       = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            int      whatsApp       = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            int      viper          = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            string   Twiter         = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            string   study          = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            int      yearstudy      = ClassConvert.ConvToStady(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);;
            int      Id_course      = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            string   Id_course_Ware = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            DateTime data_regs      = ClassConvert.ConvDateTime(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);

            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;

            int    bitd_id     = ClassConvert.ConvintBoloed(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            string Nkname      = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            string nameEnglish = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            int    Z1          = ClassConvert.ConvSizeToint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            int    z2          = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            int    z3          = ClassConvert.ConvSizeToint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);

            System.Xml.XmlDataDocument XmlHobbies = null;



            Vitl vitl1 = 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.SqlSaveAdderAndBack(vitl1);
        }
        private void buttonX1_Click(object sender, EventArgs e)
        {
            if (TeamEdit == null)
            {
                TeamEdit = new Team(CountOfNew, ClassConvert.ConvDateTimeNull(date_Start.Value), ClassConvert.ConvDateTimeNull(Date_End.Value), idVite, SerchByComBBox(id_NameTeam_Ta, NameTeam.NameTeamStatic), SerchByComBBox(Id_Jop_Ta, Jop.JopStatic), Setewation.SelectedIndex);
                CountOfNew--;
                this.DialogResult = System.Windows.Forms.DialogResult.Yes;
            }
            else
            {
                TeamEdit.Eidt(ClassConvert.ConvDateTimeNull(date_Start.Value), ClassConvert.ConvDateTimeNull(Date_End.Value), idVite, SerchByComBBox(id_NameTeam_Ta, NameTeam.NameTeamStatic), SerchByComBBox(Id_Jop_Ta, Jop.JopStatic), Setewation.SelectedIndex);
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
            }

            this.Close();
        }
        private async void IDCartOut_Load(object sender, EventArgs e)
        {
            foreach (int item in id_information)
            {
                Vitl dw2 = new Vitl();

                await dw2.MakeAsn(item);

                Vitl1.Add(dw2);
                Team1.Add((await(Team.GetByIdVil(item, true)))[0]);
                ifHaveCores72.Add(await Couress.GetIsItHaveCouresByIdInformation(item, 3, true));

                dataGridViewX1.Rows.Add(Vitl1[Vitl1.Count - 1].id, "ALP-" + ClassConvert.ConvIdNumberAdderZero4Digit(Vitl1[Vitl1.Count - 1].Id_course), Vitl1[Vitl1.Count - 1].first_name + " " + Vitl1[Vitl1.Count - 1].Last_name, ClassConvert.ConvStringBoloed(Vitl1[Vitl1.Count - 1].Boold_id), Jop.JopStatic[ClassDataGridViewDo.RetunIndexByIdSech(Team1[Team1.Count - 1].Id_Jop_Ta, Jop.JopStatic)].NvacherWord, Jop.JopStatic[ClassDataGridViewDo.RetunIndexByIdSech(Team1[Team1.Count - 1].Id_Jop_Ta, Jop.JopStatic)].NvacherWordEng,
                                        Vitl1[Vitl1.Count - 1].data_barthday.Year.ToString(), Vitl1[Vitl1.Count - 1].nameEnglish);
            }
            MegBox.Show("إنتها");
        }
Exemple #19
0
        private void dataGridViewX1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                CoresEditAdder Detalis1 = new CoresEditAdder();
                Detalis1.idVite      = NameOfCouress.id;
                this.Opacity         = 0.5;
                Detalis1.CouressEdit = CouressList[ClassDataGridViewDo.RetunIndexByIdSech(ClassConvert.Convint(dataGridViewX1.Rows[e.RowIndex].Cells[0].Value), CouressList)];
                if (Detalis1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    CouressList[ClassDataGridViewDo.RetunIndexByIdSech(ClassConvert.Convint(dataGridViewX1.Rows[e.RowIndex].Cells[0].Value), CouressList)] = Detalis1.CouressEdit;

                    if (ClassConvert.Convint(dataGridViewX1.Rows[e.RowIndex].Cells[0].Value) > 0)
                    {
                        IntEditCoress.Add(ClassDataGridViewDo.RetunIndexByIdSech(ClassConvert.Convint(dataGridViewX1.Rows[e.RowIndex].Cells[0].Value), CouressList));
                    }
                }

                ClassDataGridViewDo.DataGridEnterGridToWorkNameOfCouress_ta(dataGridViewX1, CouressList, VitlByIdList);
                this.Opacity = 1;
            }
        }
        private void dataGridViewX3_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                ShowAllIteam ShowAllIteam1 = new ShowAllIteam(WereDeliveryList[ClassDataGridViewDo.RetunIndexByIdSech(ClassConvert.Convint(dataGridViewX3.Rows[e.RowIndex].Cells[0].Value), WereDeliveryList)]);
                ShowAllIteam1.idVite = idvite;
                this.Opacity         = 0.5;
                if (ShowAllIteam1.ShowDialog() == System.Windows.Forms.DialogResult.Yes)
                {
                    WereDeliveryList[ClassDataGridViewDo.RetunIndexByIdSech(ClassConvert.Convint(dataGridViewX3.Rows[e.RowIndex].Cells[0].Value), WereDeliveryList)] = ShowAllIteam1.Waredelivare;

                    if (ClassConvert.Convint(dataGridViewX3.Rows[e.RowIndex].Cells[0].Value) > 0)
                    {
                        IntEditWere.Add(ClassDataGridViewDo.RetunIndexByIdSech(ClassConvert.Convint(dataGridViewX3.Rows[e.RowIndex].Cells[0].Value), WereDeliveryList));
                    }
                    needSeaving = true;
                }

                ClassDataGridViewDo.DataGridEnterGridToWorkWereDelivery(dataGridViewX3, WereDeliveryList);
                this.Opacity = 1;
            }
        }
Exemple #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 void buttonX1_Click(object sender, EventArgs e)
        {
            if (this.comboBoxEx2.SelectedIndex == -1)
            {
                MegBox.Show("عليك إختيار الوضع");
                return;
            }
            if (this.comboBoxEx3.SelectedIndex == -1)
            {
                MegBox.Show("عليك إختيار المنصب");
                return;
            }

            if (Team == null)
            {
                if (RibbonForm1.Combox.IndexOf(textBoxX1.Text) != -1)
                {
                    Team = new Team(0, ClassConvert.ConvDateTimeNull(dateTimeInput1.Value), ClassConvert.ConvDateTimeNull(dateTimeInput2.Value), intList[RibbonForm1.Combox.IndexOf(textBoxX1.Text)], NameTeam.id, EditTame.SerchByComBBox(comboBoxEx3, Jop.JopStatic), comboBoxEx2.SelectedIndex);
                    this.DialogResult = System.Windows.Forms.DialogResult.OK;
                }
                else
                {
                    MegBox.Show("الأسم غير موجود");
                }
            }
            else
            {
                if (RibbonForm1.Combox.IndexOf(textBoxX1.Text) != -1)
                {
                    Team.Eidt(ClassConvert.ConvDateTimeNull(dateTimeInput1.Value), ClassConvert.ConvDateTimeNull(dateTimeInput2.Value), intList[RibbonForm1.Combox.IndexOf(textBoxX1.Text)], NameTeam.id, EditTame.SerchByComBBox(comboBoxEx3, Jop.JopStatic), comboBoxEx2.SelectedIndex);
                    this.DialogResult = System.Windows.Forms.DialogResult.OK;
                }
                else
                {
                    MegBox.Show("الأسم غير موجود");
                }
            }
        }
Exemple #23
0
        public static List <TypeofCouress> GetAll()
        {
            List <TypeofCouress> Lista = new List <TypeofCouress>();

            System.Data.SqlClient.SqlCommand SqlComm = new System.Data.SqlClient.SqlCommand("SELECT [Id],[NameOfCouress],[NameTeam_Ta] FROM [dbo].[TypeofCouress_ta] where [Delete] = 0");
            Task <List <List <object> > >    temp    = Sqldatabasethrding.GetSql(SqlComm);

            while (!temp.IsCompleted)
            {
            }

            List <List <object> > Adw = temp.Result;

            for (int i = 0; i < Adw.Count; i++)
            {
                if (Adw[i].Count != 0)
                {
                    Lista.Add(new TypeofCouress(Convert.ToInt32(Adw[i][0]), ClassConvert.ConvString(Adw[i][1]), ClassConvert.Convint(Adw[i][2])));
                }
            }

            return(Lista);
        }
        public static List <NameOfCouress> GetAll()
        {
            List <NameOfCouress> Lista = new List <NameOfCouress>();

            System.Data.SqlClient.SqlCommand SqlComm = new System.Data.SqlClient.SqlCommand("SELECT [Id],[dataStart],[DataENd],[Suport],[Id_TypeofCouress_ta]   ,[Decrption] ,[IntCoures] , WhereIS FROM [HR_SARC].[dbo].[NameOfCouress_ta] where [Delete] = 0");
            Task <List <List <object> > >    temp    = Sqldatabasethrding.GetSql(SqlComm);

            while (!temp.IsCompleted)
            {
            }

            List <List <object> > Adw = temp.Result;

            for (int i = 0; i < Adw.Count; i++)
            {
                if (Adw[i].Count != 0)
                {
                    Lista.Add(new NameOfCouress(Convert.ToInt32(Adw[i][0]), ClassConvert.ConvDateTime(Adw[i][1]), ClassConvert.ConvDateTime(Adw[i][2]), ClassConvert.ConvBool(Adw[i][3]), Convert.ToInt32(Adw[i][4]), Convert.ToString(Adw[i][5]), Convert.ToInt32(Adw[i][6]), Convert.ToInt32(Adw[i][7])));
                }
            }

            return(Lista);
        }
        private void dataGridViewX1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                EditTame Detalis1 = new EditTame();
                Detalis1.idVite   = idvite;
                this.Opacity      = 0.5;
                Detalis1.TeamEdit = TeamList[ClassDataGridViewDo.RetunIndexByIdSech(ClassConvert.Convint(dataGridViewX1.Rows[e.RowIndex].Cells[0].Value), TeamList)];
                if (Detalis1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    TeamList[ClassDataGridViewDo.RetunIndexByIdSech(ClassConvert.Convint(dataGridViewX1.Rows[e.RowIndex].Cells[0].Value), TeamList)] = Detalis1.TeamEdit;

                    if (ClassConvert.Convint(dataGridViewX1.Rows[e.RowIndex].Cells[0].Value) > 0)
                    {
                        IntEditTeam.Add(ClassDataGridViewDo.RetunIndexByIdSech(ClassConvert.Convint(dataGridViewX1.Rows[e.RowIndex].Cells[0].Value), TeamList));
                    }
                    needSeaving = true;
                }

                ClassDataGridViewDo.DataGridEnterGridToWorkTeam(dataGridViewX1, TeamList);
                this.Opacity = 1;
            }
        }
Exemple #26
0
        public async static Task <List <Team> > GetByIdVil(int id, bool Activet = false)
        {
            List <Team> Lista = new List <Team>();

            System.Data.SqlClient.SqlCommand SqlComm = new System.Data.SqlClient.SqlCommand("SELECT [Id],[date_Start] ,[Date_End],[ID_informtion],[id_NameTeam_Ta],[Id_Jop_Ta] ,[Setewation],[Delete] FROM [HR_SARC].[dbo].[Team_ta] where [Delete] = 0 and [ID_informtion] = @id ");
            if (Activet)
            {
                SqlComm.CommandText += " And ( [Date_End] is null ) ";
            }
            SqlComm.Parameters.AddWithValue("@id", id);
            List <List <object> > Adw = await Sqldatabasethrding.GetSql(SqlComm);



            for (int i = 0; i < Adw.Count; i++)
            {
                if (Adw[i].Count != 0)
                {
                    Lista.Add(new Team(Convert.ToInt32(Adw[i][0]), ClassConvert.ConvDateTimeNull(Adw[i][1]), ClassConvert.ConvDateTimeNull(Adw[i][2]), Convert.ToInt32(Adw[i][3]), Convert.ToInt32(Adw[i][4]), Convert.ToInt32(Adw[i][5]), Convert.ToInt32(Adw[i][6])));
                }
            }

            return(Lista);
        }
        public CV_Info(int id)
        {
            //
            System.Data.SqlClient.SqlCommand SqlCommand = new System.Data.SqlClient.SqlCommand("SELECT  [id]  ,[FullName] ,[Notes]  ,[NmuberOfArchev]  ,[Id_Study] ,[Year_sutr],[Numberphone]  ,[Date],[ID_TemaNeed] ,[Bit]   ,[ToOutTeam]  ,[ToOutDate]  ,[Notesout] FROM [HR_SARC].[dbo].[CV_Info] where [Delete] =0 and  id = @id");
            SqlCommand.Parameters.AddWithValue("id", id);
            List <List <object> > Adw = (Sqldatabasethrding.GetSql(SqlCommand)).Result;

            if (Adw[0].Count != 0)
            {
                this.id             = Convert.ToInt32(Adw[0][0]);
                this.FullName       = Convert.ToString(Adw[0][1]);
                this.Notes          = Convert.ToString(Adw[0][2]);
                this.NmuberOfArchev = Convert.ToInt32(Adw[0][3]);
                this.Id_Study       = Convert.ToInt32(Adw[0][4]);
                this.Year_sutr      = Convert.ToInt32(Adw[0][5]);
                this.Numberphone    = Convert.ToInt32(Adw[0][6]);
                this.Date           = ClassConvert.ConvDateTimeNull(Adw[0][7]);
                this.ID_TemaNeed    = Convert.ToInt32(Adw[0][8]);
                this.Bit            = Convert.ToBoolean(Adw[0][9]);
                this.ToOutTeam      = ClassConvert.Convint(Adw[0][10]);
                this.ToOutDate      = ClassConvert.ConvDateTimeNull(Adw[0][11]);
                this.Notesout       = Convert.ToString(Adw[0][12]);
            }
        }
Exemple #28
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            if (comboBoxEx1.SelectedIndex == -1)
            {
                MegBox.Show("إختار أسم المادة");
                return;
            }

            if (Waredelivare == null)
            {
                Waredelivare      = new WereDelivery(0, WereType.WereTypeList[comboBoxEx1.SelectedIndex].id, ClassConvert.ConvDateTimeNull(dateTimeInput1.Value), this.idVite, ClassConvert.ConvDateTimeNull(dateTimeInput2.Value), textBoxX2.Text);
                this.DialogResult = System.Windows.Forms.DialogResult.Yes;
            }
            else
            {
                Waredelivare      = new WereDelivery(Waredelivare.id, WereType.WereTypeList[comboBoxEx1.SelectedIndex].id, ClassConvert.ConvDateTimeNull(dateTimeInput1.Value), this.idVite, ClassConvert.ConvDateTimeNull(dateTimeInput2.Value), textBoxX2.Text);
                this.DialogResult = System.Windows.Forms.DialogResult.Yes;
            }
        }
        public static async System.Threading.Tasks.Task <List <CV_Info> > Serch(string Fullname, string Notes, int Id_Study, int Year_sutr, int ID_TemaNeed, bool Chek, int NumberPhone, string CodeForCV, int SelectTeamOut, string NotesOut)
        {
            String         Where = "";
            List <CV_Info> Ve    = new List <CV_Info>();

            Fullname = ClassDataGridViewDo.LograthemChangEverAleffToAll(Fullname, true);



            System.Data.SqlClient.SqlCommand Sqlcom = new System.Data.SqlClient.SqlCommand("SELECT  [id]  ,[FullName] ,[Notes]  ,[NmuberOfArchev]  ,[Id_Study] ,[Year_sutr],[Numberphone]  ,[Date],[ID_TemaNeed] ,[Bit] ,[ToOutTeam] , [ToOutDate] , [Notesout],[Delete]  FROM [HR_SARC].[dbo].[CV_Info] where [Delete] =0 and [FullName] = @FullName  " + Where);
            if (Notes.Trim() != "")
            {
                Where += " and [Notes] like @Notes";
                Sqlcom.Parameters.AddWithValue("@Notes", "%" + ClassDataGridViewDo.LograthemChangEverAleffToAll(Notes) + "%");
            }

            if (Id_Study != -1)
            {
                Where += " and [Id_Study] = @Id_Study";
                Sqlcom.Parameters.AddWithValue("Id_Study", Id_Study);
            }
            if (Year_sutr != -1)
            {
                Where += " and [Year_sutr] = @Year_sutr";
                Sqlcom.Parameters.AddWithValue("Year_sutr", Year_sutr);
            }
            if (ID_TemaNeed != -1)
            {
                Where += " and [ID_TemaNeed] = @ID_TemaNeed";
                Sqlcom.Parameters.AddWithValue("ID_TemaNeed", ID_TemaNeed);
            }
            if (Chek)
            {
                Where += " and [Bit] = @Bit";
                Sqlcom.Parameters.AddWithValue("Bit", !Chek);
            }
            if (NumberPhone != 0)
            {
                Where += " and [Numberphone] = @Numberphone";
                Sqlcom.Parameters.AddWithValue("Numberphone", NumberPhone);
            }
            if (SelectTeamOut != -1)
            {
                Where += " and [ToOutTeam] = @ToOutTeam";
                Sqlcom.Parameters.AddWithValue("ToOutTeam", SelectTeamOut);
            }
            if (NotesOut.Trim() != "")
            {
                Where += " and [Notesout] like @Notesout";
                Sqlcom.Parameters.AddWithValue("Notesout", "%" + ClassDataGridViewDo.LograthemChangEverAleffToAll(NotesOut, true) + "%");
            }


            Sqlcom.CommandText = "SELECT  [id]  ,[FullName] ,[Notes]  ,[NmuberOfArchev]  ,[Id_Study] ,[Year_sutr],[Numberphone]  ,[Date],[ID_TemaNeed] ,[Bit] ,[ToOutTeam] , [ToOutDate] , [Notesout],[Delete]  FROM [HR_SARC].[dbo].[CV_Info] where [Delete] =0 and [FullName] like @FullName  " + Where;
            Sqlcom.Parameters.AddWithValue("@FullName", "%" + Fullname + "%");

            if (CodeForCV != "")
            {
                Sqlcom.CommandText = "SELECT  [id]  ,[FullName] ,[Notes]  ,[NmuberOfArchev]  ,[Id_Study] ,[Year_sutr],[Numberphone]  ,[Date],[ID_TemaNeed] ,[Bit] ,[ToOutTeam] , [ToOutDate] , [Notesout],[Delete]  FROM [HR_SARC].[dbo].[CV_Info] where [Delete] =0 and [id] = @id  ";
                Sqlcom.Parameters.AddWithValue("id", await CV_Info.Serch(CodeForCV));
            }


            List <List <object> > Ob = await Sqldatabasethrding.GetSql(Sqlcom);

            for (int i = 0; i < Ob.Count; i++)
            {
                if (Ob[i].Count != 0)
                {
                    try
                    {
                        Ve.Add(new CV_Info(
                                   Convert.ToInt32(Ob[i][0]),
                                   Convert.ToString(Ob[i][1]),
                                   Convert.ToString(Ob[i][2]),
                                   Convert.ToInt32(Ob[i][3]),
                                   Convert.ToInt32(Ob[i][4]),
                                   Convert.ToInt32(Ob[i][5]),
                                   Convert.ToInt32(Ob[i][6]),
                                   ClassConvert.ConvDateTimeNull(Ob[i][7]),
                                   Convert.ToInt32(Ob[i][8]),
                                   Convert.ToBoolean(Ob[i][9]),
                                   -1,
                                   null,
                                   null
                                   ));
                    }
                    catch (Exception e)
                    {
                        ErrorClass.SaveErrorFile(e);
                    }
                }
            }

            return(Ve);
        }
Exemple #30
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);
                }
            }
        }