Ejemplo n.º 1
0
        private async void RibbonForm2_Load(object sender, EventArgs e)
        {
            #region تحميل الفريم الأولي

            #region تحميل معلومات الأساسية للجدول الفريق
            ClassDataGridViewDo.DataGridAddVuleComBoxEx((DataGridViewComboBoxExColumn)dataGridViewX1.Columns["TeamTeam"], NameTeamType.NameTeamTypeStatic, NameTeam.NameTeamStatic);
            ClassDataGridViewDo.DataGridAddVuleComBoxEx((DataGridViewComboBoxExColumn)dataGridViewX1.Columns["TeamJop"], Jop.JopStatic);
            ClassDataGridViewDo.DataGridAddVuleComBoxEx((DataGridViewComboBoxExColumn)dataGridViewX2.Columns["id_NameOfCouress"], NameOfCouress.NameOfCouresslist);
            ClassDataGridViewDo.DataGridAddVuleComBoxEx((DataGridViewComboBoxExColumn)dataGridViewX1.Columns["TeamStatus"], Team.Setwation);

            #endregion


            /// في كان ت
            if (idvite != 0)
            {
                #region تحميل المعلومات في حال كان هناك مستخدم للتعديل
                #region معلومات العامة
                vitl1                         = new Vitl(idvite);
                first_name.Text               = vitl1.first_name;
                Last_name.Text                = vitl1.Last_name;
                Father_name.Text              = vitl1.Father_name;
                Mather_name.Text              = vitl1.Mather_name;
                natiol_id.Text                = ClassConvert.ConvToIdNational(vitl1.natiol_id);
                Gender.SelectedIndex          = ClassConvert.ConvGenderBoolNull(vitl1.Gender);
                where_birth.Text              = vitl1.where_birth;
                data_barthday.Value           = vitl1.data_barthday;
                Hanei_whare.Text              = vitl1.Hanei_whare;
                Hanei_whare1.Text             = vitl1.Hanei_whare1;
                adderas.Text                  = vitl1.adderas;
                e_mail.Text                   = vitl1.e_mail;
                Stutes_Jtma3.SelectedIndex    = vitl1.Stutes_Jtma3;
                Phone_Ground.Text             = vitl1.Phone_Ground.ToString();
                Phone_Mobile1.Text            = vitl1.Phone_Mobile1.ToString();
                Phone_Mobile2.Text            = vitl1.Phone_Mobile2.ToString();
                Facebook.Text                 = vitl1.Facebook;
                Twiter.Text                   = vitl1.Twiter;
                whatsApp.Text                 = vitl1.whatsApp.ToString();
                viper.Text                    = vitl1.viper.ToString();
                study.Text                    = vitl1.study;
                yearstudy.SelectedIndex       = vitl1.yearstudy;
                Id_course.Text                = vitl1.Id_course.ToString();
                Id_course_Ware.Text           = vitl1.Id_course_Ware;
                data_regs.Value               = vitl1.data_regs;
                Image_id_nationl1.Image       = vitl1.Image_id_nationl1;
                Image_id_nationl2.Image       = vitl1.Image_id_nationl2;
                image.Image                   = vitl1.image;
                image1.Image                  = vitl1.image;
                Image_font.Image              = vitl1.Image_font;
                bitd_id.SelectedIndex         = vitl1.Boold_id;
                Nkname.Text                   = vitl1.Nkname;
                nameEnglish.Text              = vitl1.nameEnglish;
                Z1.SelectedIndex              = vitl1.Z1;
                z2.Text                       = vitl1.z2.ToString();
                z3.SelectedIndex              = vitl1.z3;
                this.dataGridView7.DataSource = vitl1.XmlHobbies;
                #endregion
                #region الفريق

                /////إضافة الفريق إلى جدول الفرق
                EditTame.CountOfNew = 0;
                TeamList            = await Team.GetByIdVil(idvite);

                ClassDataGridViewDo.DataGridEnterGridToWorkTeam(dataGridViewX1, TeamList);
                #endregion
                #region الدورات
                CoresEditAdder.CountOfNew = 0;
                CouressList = Couress.GetByIdVil(idvite);
                ClassDataGridViewDo.DataGridEnterGridToWorkCorser(dataGridViewX2, CouressList);
                #endregion
                #region المواد

                WereDeliveryList = WereDelivery.GetByIdVil(idvite);
                ClassDataGridViewDo.DataGridEnterGridToWorkWereDelivery(dataGridViewX3, WereDeliveryList);

                #endregion

                #region المواد

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

                #endregion
                #endregion
            }
            else
            {
                this.Text = "تسجيل متطوع جديد";
            }

            #endregion
            needSeaving = false;
        }
        public static void DataGridEnterGridForGetdateByID(DevComponents.DotNetBar.Controls.DataGridViewX Grid, Vitl vitl, List <Team> Teamlest, List <Couress> coureslist)
        {
            string listtamestring = "";
            string listtcoures    = "";

            foreach (Team item in Teamlest)
            {
                listtamestring += " + " + NameTeam.NameTeamStatic[ClassDataGridViewDo.RetunIndexByIdSech(item.id_NameTeam_Ta, NameTeam.NameTeamStatic)].nameOftame;
            }

            foreach (Couress item in coureslist)
            {
                listtcoures += " + " + NameOfCouress.NameOfCouresslist[ClassDataGridViewDo.RetunIndexByIdSech(item.id_NameOfCouress, NameOfCouress.NameOfCouresslist)].Decrption;
            }


            if (coureslist.Count != 0)
            {
                listtcoures = listtcoures.Remove(0, 2);
            }

            if (Teamlest.Count != 0)
            {
                listtamestring = listtamestring.Remove(0, 2);
            }

            Grid.Rows.Add(
                vitl.id.ToString()
                , ClassConvert.ConvNonullTostring(vitl.first_name) + " " + ClassConvert.ConvNonullTostring(vitl.Last_name)
                , ClassConvert.ConvNonullTostring(vitl.first_name)
                , ClassConvert.ConvNonullTostring(vitl.Last_name)
                , ClassConvert.ConvNonullTostring(vitl.Father_name)
                , ClassConvert.ConvNonullTostring(vitl.Mather_name)
                , ClassConvert.ConvNonullTostring(ClassConvert.ConvToIdNational(vitl.natiol_id))
                , vitl.Gender == false ? "ذكر" : vitl.Gender == true ? "إنثى" : ""
                , ClassConvert.ConvNonullTostring(vitl.where_birth)
                , vitl.data_barthday.ToShortDateString()
                , ClassConvert.ConvNonullTostring(vitl.Hanei_whare)
                , ClassConvert.ConvNonullTostring(vitl.Hanei_whare1)
                , ClassConvert.ConvNonullTostring(vitl.adderas)
                , ClassConvert.ConvNonullTostring(vitl.e_mail)
                , ClassConvert.Stutes_Jtma3Tostring(vitl.Stutes_Jtma3, vitl.Gender)
                , vitl.Phone_Ground.ToString()
                , vitl.Phone_Mobile1.ToString()
                , vitl.Phone_Mobile2.ToString()
                , ClassConvert.ConvNonullTostring(vitl.Facebook)
                , ClassConvert.ConvNonullTostring(vitl.Twiter)
                , vitl.whatsApp.ToString()
                , vitl.viper.ToString()
                , ClassConvert.ConvNonullTostring(vitl.study)
                , ClassConvert.yearstudyToString(vitl.yearstudy)
                , vitl.Id_course.ToString()
                , ClassConvert.ConvNonullTostring(vitl.Id_course_Ware)
                , vitl.data_regs.ToShortDateString()
                , ClassConvert.ConvStringBoloed(vitl.Boold_id)
                , ClassConvert.ConvNonullTostring(vitl.Nkname)
                , ClassConvert.ConvNonullTostring(vitl.nameEnglish)
                , ClassConvert.ConvSizeToString(vitl.Z1)
                , vitl.z2.ToString()
                , ClassConvert.ConvSizeToString(vitl.z3)
                , listtamestring
                , listtcoures
                );
        }