Example #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);
                }
            }
        }
Example #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("لا يوجد إنترنت");
            }
        }
Example #3
0
 private void buttonX1_Click(object sender, EventArgs e)
 {
     if (NameTeam == null)
     {
         if (comboBoxEx1.SelectedIndex != -1)
         {
             NameTeam          = new NameTeam(0, textBoxX1.Text, NameTeamType.NameTeamTypeStatic[Convert.ToInt32(comboBoxEx1.SelectedIndex)].id);
             this.DialogResult = System.Windows.Forms.DialogResult.OK;
         }
         else
         {
             MegBox.Show("يجب إختيار نوع الفريق من القائمة", this);
         }
     }
     else
     {
         if (comboBoxEx1.SelectedIndex != -1)
         {
             NameTeam          = new NameTeam(NameTeam.id, textBoxX1.Text, NameTeamType.NameTeamTypeStatic[Convert.ToInt32(comboBoxEx1.SelectedIndex)].id);
             this.DialogResult = System.Windows.Forms.DialogResult.OK;
         }
         else
         {
             MegBox.Show("يجب إختيار نوع الفريق من القائمة", this);
         }
     }
 }
 private void buttonX1_Click(object sender, EventArgs e)
 {
     try {
         List <AsncyGetInformation> AsncyGetInformation = DownloadDataFromWebCliend.GetInfrmationofdateGet(DownloadDataFromWebCliend.EnumGetXML.GetString);
         ClassDataGridViewDo.DataGridEnterAsncyGetInformation(dataGridViewX1, AsncyGetInformation);
     }
     catch (Exception ec)
     {
         MegBox.Show(ec.Message, this);
     }
 }
 private async void buttonX3_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < dataGridViewX1.Rows.Count; i++)
     {
         if (Convert.ToInt32(dataGridViewX1.Rows[i].Cells["id"].Value) > 0)
         {
             await Vitl.EditByidNationId(Convert.ToInt32(dataGridViewX1.Rows[i].Cells["id"].Value),
                                         Convert.ToInt64(dataGridViewX1.Rows[i].Cells["الرقم الوطني"].Value));
         }
     }
     MegBox.Show("تم التعديل");
 }
Example #6
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);
             }
         }
     }
 }
Example #7
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;
     }
 }
Example #8
0
 private void ChkPassWord()
 {
     if (textBoxX1.Text == "Rama" && textBoxX2.Text == "Rama")
     {
         Runx();
     }
     else if (textBoxX1.Text == "mo" && textBoxX2.Text == "suse1987")
     {
         Sqldatabasethrding.sqlconction = "Data Source=SARC-1-HP\\M1992;Initial Catalog=HR_SARC;Integrated Security=True";
         Runx();
     }
     else
     {
         MegBox.Show("كلمة سر خطأ!");
     }
 }
Example #9
0
        private async void buttonX2_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < dataGridViewX1.Rows.Count; i++)
            {
                int idw = Convert.ToInt32(await CV_Info.Serch((dataGridViewX1.Rows[i].Cells[0].Value).ToString()));
                if (idw != -1)
                {
                    CV_Info iNfo = new CV_Info(idw);

                    await iNfo.UpdateForGetTheCV(-1, null, "");
                }

                //    MessageBox.Show( (await CV_Info.Serch(textBoxX1.Text)).ToString());
            }
            MegBox.Show("تم المعالجة");
        }
        private async void buttonX2_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < dataGridViewX1.Rows.Count; i++)
            {
                int idw = Convert.ToInt32(await CV_Info.Serch((dataGridViewX1.Rows[i].Cells[0].Value).ToString()));
                if (idw != -1)
                {
                    CV_Info iNfo = new CV_Info(idw);

                    await iNfo.UpdateForGetTheCV(CvTeamNeed.CvTeamNeedList[comboBoxEx1.SelectedIndex].id, dateTimeInput1.Value, textBoxX2.Text);
                }

                //    MessageBox.Show( (await CV_Info.Serch(textBoxX1.Text)).ToString());
            }
            MegBox.Show("تم المعالجة");
        }
Example #11
0
        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("إنتها");
        }
 private void dataGridViewX1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex != -1)
     {
         InformationOfdateGet InformationOfdateGet = new InformationOfdateGet(Convert.ToInt32(dataGridViewX1.Rows[e.RowIndex].Cells[0].Value), dataGridViewX1.Rows[e.RowIndex].Cells[1].Value.ToString());
         InformationOfdateGet.ShowDialog();
         try
         {
             List <AsncyGetInformation> AsncyGetInformation = DownloadDataFromWebCliend.GetInfrmationofdateGet(DownloadDataFromWebCliend.EnumGetXML.GetString);
             ClassDataGridViewDo.DataGridEnterAsncyGetInformation(dataGridViewX1, AsncyGetInformation);
         }
         catch (Exception ec)
         {
             MegBox.Show(ec.Message, this);
         }
     }
 }
Example #13
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;
        }
        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("أحد الحقول فارغه");
            }
        }
Example #15
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;
        }
Example #16
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;
            }
        }
        private void buttonX1_Click(object sender, EventArgs e)
        {
            if (comboBoxEx1.SelectedIndex == -1)
            {
                MegBox.Show("يجب إختيار من قائمة");
                return;
            }


            if (HaveScil == null)
            {
                HaveScil          = new HaveScil(NumberAdderId, Scileis.ScileislList[comboBoxEx1.SelectedIndex].id, CV_INFo, ratingStar1.Rating);
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
            }
            else
            {
                HaveScil          = new HaveScil(HaveScil.id, Scileis.ScileislList[comboBoxEx1.SelectedIndex].id, CV_INFo, ratingStar1.Rating);
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
            }
        }
Example #18
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();
         }
     }
 }
Example #19
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;
            }
        }
Example #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;
            }
        }
        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 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("الأسم غير موجود");
                }
            }
        }
Example #23
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            if (textBoxX1.Text.Trim() != "" && textBoxX2.Text.Trim() != "")
            {
                if (AdderOrEdit)
                {
                    jop = new Jop(0, textBoxX1.Text, textBoxX2.Text, false);
                    this.DialogResult = System.Windows.Forms.DialogResult.OK;
                }
                else
                {
                    this.Text          = "تعديل مناصب";
                    this.buttonX1.Text = "تعديل";
                    jop = new Jop(jop.id, textBoxX1.Text, textBoxX2.Text, false);


                    this.DialogResult = System.Windows.Forms.DialogResult.OK;
                }
            }
            else
            {
                MegBox.Show("أحد الحقول فارغه");
            }
        }
Example #24
0
        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;
            }
        }
        private async System.Threading.Tasks.Task SaveNewOrUpdate()
        {
            try
            {
                if (idvite == 0)
                {
                    #region تسجيل متطوع جديد

                    #region المتغيرات للكلاس المعلومات الأساسية
                    int                        id                = 0;
                    string                     first_name        = this.first_name.Text;
                    string                     Last_name         = this.Last_name.Text;
                    string                     Father_name       = this.Father_name.Text;
                    string                     Mather_name       = this.Mather_name.Text;
                    Int64                      natiol_id         = ClassConvert.Convint64(this.natiol_id.Text);
                    bool                       Gender            = ClassConvert.ConvBool(this.Gender.SelectedIndex);
                    string                     where_birth       = this.where_birth.Text;
                    DateTime                   data_barthday     = ClassConvert.ConvDateTime(this.data_barthday.Value);
                    string                     Hanei_whare       = this.Hanei_whare.Text;
                    string                     Hanei_whare1      = this.Hanei_whare1.Text;
                    string                     adderas           = this.adderas.Text;
                    string                     e_mail            = this.e_mail.Text;
                    int                        Stutes_Jtma3      = this.Stutes_Jtma3.SelectedIndex;
                    int                        Phone_Ground      = ClassConvert.Convint(this.Phone_Ground.Text);
                    int                        Phone_Mobile1     = ClassConvert.Convint(this.Phone_Mobile1.Text);
                    int                        Phone_Mobile2     = ClassConvert.Convint(this.Phone_Mobile2.Text);
                    string                     Facebook          = this.Facebook.Text;
                    int                        whatsApp          = ClassConvert.Convint(this.whatsApp.Text);
                    int                        viper             = ClassConvert.Convint(this.viper.Text);
                    string                     Twiter            = (this.Twiter.Text);
                    string                     study             = this.study.Text;
                    int                        yearstudy         = this.yearstudy.SelectedIndex;
                    int                        Id_course         = ClassConvert.Convint(this.Id_course.Text);
                    string                     Id_course_Ware    = this.Id_course_Ware.Text;
                    DateTime                   data_regs         = ClassConvert.ConvDateTime(this.data_regs.Value);
                    System.Drawing.Image       Image_id_nationl1 = ClassConvert.ConvImage(this.Image_id_nationl1.Image);
                    System.Drawing.Image       Image_id_nationl2 = ClassConvert.ConvImage(this.Image_id_nationl2.Image);
                    System.Drawing.Image       image             = ClassConvert.ConvImage(this.image.Image);
                    System.Drawing.Image       Image_font        = ClassConvert.ConvImage(this.Image_font.Image);
                    int                        bitd_id           = this.bitd_id.SelectedIndex;
                    string                     Nkname            = this.Nkname.Text;
                    string                     nameEnglish       = this.nameEnglish.Text;
                    int                        Z1                = this.Z1.SelectedIndex;
                    int                        z2                = ClassConvert.Convint(this.z2.Text);
                    int                        z3                = this.z3.SelectedIndex;
                    System.Xml.XmlDataDocument XmlHobbies        = null;



                    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);


                    idvite = vitl1.id;//تاكد من عمل الصحيح للبرنامج

                    #endregion

                    #region إضافة وتعديل الفرق
                    EditTame.CountOfNew = 0;
                    foreach (Team IdInfoAdder in TeamList)
                    {
                        IdInfoAdder.EdidInfoId(idvite);
                    }
                    await Sqldatabasethrding.SqlAddOrUpdateOrDelet(ClassConvert.ConvertListInterfaseToDataBase(TeamList), IntAdderTeam, IntEditTeam, IntDeletTeam);

                    #endregion

                    #region إضافة وتعديل الدورات
                    CoresEditAdder.CountOfNew = 0;
                    foreach (Couress IdInfoAdder in CouressList)
                    {
                        IdInfoAdder.EdidInfoId(idvite);
                    }
                    await Sqldatabasethrding.SqlAddOrUpdateOrDelet(ClassConvert.ConvertListInterfaseToDataBase(CouressList), IntAdderCoress, IntEditCoress, IntDeletCoress);

                    #endregion

                    #endregion
                }
                else
                {
                    #region تعديلات العلومات العامة

                    #region المتغيرات

                    string                     first_name        = this.first_name.Text;
                    string                     Last_name         = this.Last_name.Text;
                    string                     Father_name       = this.Father_name.Text;
                    string                     Mather_name       = this.Mather_name.Text;
                    Int64                      natiol_id         = ClassConvert.Convint64(this.natiol_id.Text);
                    bool                       Gender            = ClassConvert.ConvBool(this.Gender.SelectedIndex);
                    string                     where_birth       = this.where_birth.Text;
                    DateTime                   data_barthday     = ClassConvert.ConvDateTime(this.data_barthday.Value);
                    string                     Hanei_whare       = this.Hanei_whare.Text;
                    string                     Hanei_whare1      = this.Hanei_whare1.Text;
                    string                     adderas           = this.adderas.Text;
                    string                     e_mail            = this.e_mail.Text;
                    int                        Stutes_Jtma3      = this.Stutes_Jtma3.SelectedIndex;
                    int                        Phone_Ground      = ClassConvert.Convint(this.Phone_Ground.Text);
                    int                        Phone_Mobile1     = ClassConvert.Convint(this.Phone_Mobile1.Text);
                    int                        Phone_Mobile2     = ClassConvert.Convint(this.Phone_Mobile2.Text);
                    string                     Facebook          = this.Facebook.Text;
                    int                        whatsApp          = ClassConvert.Convint(this.whatsApp.Text);
                    int                        viper             = ClassConvert.Convint(this.viper.Text);
                    string                     Twiter            = (this.Twiter.Text);
                    string                     study             = this.study.Text;
                    int                        yearstudy         = this.yearstudy.SelectedIndex;
                    int                        Id_course         = ClassConvert.Convint(this.Id_course.Text);
                    string                     Id_course_Ware    = this.Id_course_Ware.Text;
                    DateTime                   data_regs         = ClassConvert.ConvDateTime(this.data_regs.Value);
                    System.Drawing.Image       Image_id_nationl1 = ClassConvert.ConvImage(this.Image_id_nationl1.Image);
                    System.Drawing.Image       Image_id_nationl2 = ClassConvert.ConvImage(this.Image_id_nationl2.Image);
                    System.Drawing.Image       image             = ClassConvert.ConvImage(this.image.Image);
                    System.Drawing.Image       Image_font        = ClassConvert.ConvImage(this.Image_font.Image);
                    int                        bitd_id           = this.bitd_id.SelectedIndex;
                    string                     Nkname            = this.Nkname.Text;
                    string                     nameEnglish       = this.nameEnglish.Text;
                    int                        Z1         = this.Z1.SelectedIndex;
                    int                        z2         = ClassConvert.Convint(this.z2.Text);
                    int                        z3         = this.z3.SelectedIndex;
                    System.Xml.XmlDataDocument XmlHobbies = null;

                    #endregion

                    vitl1.UpdateOUtid(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);

                    await Sqldatabasethrding.SqlupdataVitl(vitl1.updata());

                    #endregion


                    #region إضافة وتعديل الفرق
                    await Sqldatabasethrding.SqlAddOrUpdateOrDelet(ClassConvert.ConvertListInterfaseToDataBase(TeamList), IntAdderTeam, IntEditTeam, IntDeletTeam);

                    #endregion


                    #region إضافة وتعديل الدورات
                    await Sqldatabasethrding.SqlAddOrUpdateOrDelet(ClassConvert.ConvertListInterfaseToDataBase(CouressList), IntAdderCoress, IntEditCoress, IntDeletCoress);

                    #endregion


                    #region إضافة وتعديل وحذف الأستلامات
                    await Sqldatabasethrding.SqlAddOrUpdateOrDelet(ClassConvert.ConvertListInterfaseToDataBase(WereDeliveryList), IntAdderWere, IntEditWere, IntDeletWere);

                    #endregion
                }

                /////Loed Team Grid
                EditTame.CountOfNew = 0;
                TeamList            = await Team.GetByIdVil(idvite);

                ClassDataGridViewDo.DataGridEnterGridToWorkTeam(dataGridViewX1, TeamList);
                ////Loed Coures Grid
                CoresEditAdder.CountOfNew = 0;
                CouressList = Couress.GetByIdVil(idvite);
                ClassDataGridViewDo.DataGridEnterGridToWorkCorser(dataGridViewX2, CouressList);
                #region التقيم


                ValuationList = Valuation.GetByIdVil(idvite);
                ClassDataGridViewDo.DataGridEnterGridToWorkValuation(dataGridViewX4, ValuationList);

                #endregion



                MegBox.Show("تم التعديل", this);
            }
            catch (Exception xv)
            { MessageBox.Show(xv.ToString()); }
        }
Example #26
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);
                }
            }
        }