Exemple #1
0
        private void btnEditStore_Click(object sender, EventArgs e)
        {
            if (dgStore.SelectedRows.Count == 1)
            {
                FormLittelEnter frmLittelEnter = new FormLittelEnter();
                frmLittelEnter.Text    = "ویرایش فروشگاه یا فرد";
                frmLittelEnter.majhool = new string[] { "editStore", "-", "-", "-", "-" };
                if (dgStore.CurrentRow.Cells[0].Value != null)
                {
                    frmLittelEnter.majhool[1] = dgStore.CurrentRow.Cells[0].Value.ToString();
                }
                if (dgStore.CurrentRow.Cells[1].Value != null)
                {
                    frmLittelEnter.majhool[2] = dgStore.CurrentRow.Cells[1].Value.ToString();
                }
                if (dgStore.CurrentRow.Cells[2].Value != null)
                {
                    frmLittelEnter.majhool[3] = dgStore.CurrentRow.Cells[2].Value.ToString();
                }
                if (dgStore.CurrentRow.Cells[3].Value != null)
                {
                    frmLittelEnter.majhool[4] = dgStore.CurrentRow.Cells[3].Value.ToString();
                }

                frmLittelEnter.ShowDialog();
            }
            else
            {
                MessageBox.Show("یک مورد را انتخاب کنید", "ویرایش", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Exemple #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            FormLittelEnter frmlittleEnter = new FormLittelEnter();

            frmlittleEnter.see = 2;
            frmlittleEnter.ShowDialog();
        }
Exemple #3
0
        private void btnEditProdoct_Click(object sender, EventArgs e)
        {
            if (dgProdoct.SelectedRows.Count == 1)
            {
                FormLittelEnter frmLittelEnter = new FormLittelEnter();
                frmLittelEnter.Text = "ویرایش محصول";
                if (dgProdoct.SelectedRows.Count == 1)
                {
                    frmLittelEnter.majhool    = new string[] { "editProdoct", "0", "0", "-", "-", "-", "-", "-" };
                    frmLittelEnter.majhool[0] = "editProdoct";                                  //frmLittelEnter.prodoct[0] = "2";

                    frmLittelEnter.majhool[1] = dgProdoct.CurrentRow.Cells[0].Value.ToString(); // dadane id meghdare entekhab shode
                    frmLittelEnter.majhool[2] = dgProdoct.CurrentRow.Cells[1].Value.ToString(); // dadane meghdare unit entekhab shode
                    frmLittelEnter.majhool[3] = dgProdoct.CurrentRow.Cells[2].Value.ToString();
                    frmLittelEnter.majhool[4] = dgProdoct.CurrentRow.Cells[3].Value.ToString();
                    if (dgProdoct.CurrentRow.Cells[4].Value == null)
                    {
                        frmLittelEnter.majhool[5] = "-";
                    }
                    if (dgProdoct.CurrentRow.Cells[5].Value == null)
                    {
                        frmLittelEnter.majhool[6] = "-";
                    }
                    if (dgProdoct.CurrentRow.Cells[6].Value == null)
                    {
                        frmLittelEnter.majhool[7] = "-";
                    }
                    frmLittelEnter.ShowDialog();
                }
            }
            else
            {
                MessageBox.Show("یک مورد را انتخاب کنید", "ویرایش", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Exemple #4
0
        private void btnAddColleague_Click(object sender, EventArgs e)
        {
            FormLittelEnter frmLitteleEnter = new FormLittelEnter();

            frmLitteleEnter.see = 3;
            frmLitteleEnter.ShowDialog();
        }