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();
        }
Exemple #2
0
        private void CoresEditAdder_Load(object sender, EventArgs e)
        {
            if (ToAddInCores == false)
            {
                comboBoxEx1.Visible = false;
                labelX1.Visible     = false;

                comboBoxEx2.Visible = true;
                labelX2.Visible     = true;
                EditTame.AdderComvbox(comboBoxEx2, NameOfCouress.NameOfCouresslist);
            }
            else
            {
                comboBoxEx1.Visible = true;
                labelX1.Visible     = true;

                comboBoxEx2.Visible = false;
                labelX2.Visible     = false;
                comboBoxEx1.AutoCompleteCustomSource = RibbonForm1.Combox;
                comboBoxEx1.AutoCompleteSource       = AutoCompleteSource.CustomSource;
                intList = RibbonForm1.intList;
            }


            if (CouressEdit != null && ToAddInCores == false)
            {
                idVite = CouressEdit.Id_Information;
                comboBoxEx2.SelectedIndex = ClassDataGridViewDo.RetunIndexByIdSech(CouressEdit.id_NameOfCouress, NameOfCouress.NameOfCouresslist);
                NumberOfdayregest.Text    = CouressEdit.NumberOfdayregest.ToString();
                Result.Text   = CouressEdit.Result.ToString();
                buttonX1.Text = "تعديل";
            }
        }
        private void buttonX5_Click(object sender, EventArgs e)
        {
            EditTame EditTame = new EditTame();

            EditTame.idVite = idvite;
            if (EditTame.ShowDialog() == System.Windows.Forms.DialogResult.Yes)
            {
                TeamList.Add(EditTame.TeamEdit);
                IntAdderTeam.Add(TeamList.Count - 1);
                needSeaving = true;
            }
            ClassDataGridViewDo.DataGridEnterGridToWorkTeam(dataGridViewX1, TeamList);
        }
        private void WereDeliveryEditAdder_Load(object sender, EventArgs e)
        {
            EditTame.AdderComvbox(comboBoxEx1, WereType.WereTypeList);

            if (WereDeliveryEdit != null)
            {
                comboBoxEx1.SelectedIndex = ClassDataGridViewDo.RetunIndexByIdSech(WereDeliveryEdit.Id_WereType, WereType.WereTypeList);
                dateTimeInput1.Value      = WereDeliveryEdit.dateDeliveryitem.Value;
                dateTimeInput2.Value      = WereDeliveryEdit.DateBackitem.Value;
                textBoxX1.Text            = WereDeliveryEdit.Notes;
                this.Text     = "تعديل أستلام مادة";
                buttonX1.Text = "تعديل";
            }
            else
            {
                this.Text     = "إضافة أستلام مادة";
                buttonX1.Text = "تعديل";
            }
        }
        private void Corser_Load(object sender, EventArgs e)
        {
            EditTame.AdderComvbox(comboBoxEx1, TypeofCouress.TypeofCouressList);
            if (NameOfCouress == null)
            {
            }
            else
            {
                Type                      = NameOfCouress.Id_TypeofCouress_ta;
                textBoxX1.Text            = NameOfCouress.Decrption;
                comboBoxEx1.SelectedIndex = ClassDataGridViewDo.RetunIndexByIdSech(NameOfCouress.Id_TypeofCouress_ta, TypeofCouress.TypeofCouressList);
                comboBoxEx1.Enabled       = false;
                CouressList               = Couress.GetByNameOfCores(NameOfCouress.id);

                foreach (Couress Couressv in CouressList)
                {
                    VitlByIdList.Add(Vitl.VitlIdAndName(Couressv.Id_Information));
                }

                ClassDataGridViewDo.DataGridEnterGridToWorkNameOfCouress_ta(dataGridViewX1, CouressList, VitlByIdList);
            }
        }
Exemple #6
0
        private void Corser_Load(object sender, EventArgs e)
        {
            ClassDataGridViewDo.DataGridAddVuleComBoxEx((DataGridViewComboBoxExColumn)dataGridViewX1.Columns["Id_Jop_Ta"], Jop.JopStatic);
            ClassDataGridViewDo.DataGridAddVuleComBoxEx((DataGridViewComboBoxExColumn)dataGridViewX1.Columns["Setewation"], Team.Setwation);
            EditTame.AdderComvbox(comboBoxEx1, NameTeamType.NameTeamTypeStatic);
            if (NameTeam != null)
            {
                ///////
                Type                      = NameTeam.NameTeamType_Id;
                textBoxX1.Text            = NameTeam.nameOftame;
                comboBoxEx1.SelectedIndex = ClassDataGridViewDo.RetunIndexByIdSech(NameTeam.NameTeamType_Id, NameTeamType.NameTeamTypeStatic);
                comboBoxEx1.Enabled       = false;
                ////////////////

                TeamList = Team.GetByGetbyIdNameName(NameTeam.id, checkBoxX1.Checked);
                foreach (Team TeamVX in TeamList)
                {
                    VitlByIdList.Add(new IdAndName(TeamVX.ID_informtion));
                }

                ClassDataGridViewDo.DataGridEnterGridToWorkTeam(dataGridViewX1, TeamList, VitlByIdList);
            }
        }
        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;
            }
        }
 private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e)
 {
     this.Type           = EditTame.SerchByComBBox(comboBoxEx1, TypeofCouress.TypeofCouressList);
     comboBoxEx1.Enabled = false;
 }
        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("الأسم غير موجود");
                }
            }
        }