示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Dispose();
            Quotation frm = new Quotation();

            frm.Show();
        }
示例#2
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            DataGridViewRow dr = dataGridView1.SelectedRows[0];

            this.Dispose();
            Quotation frm = new Quotation();

            frm.Show();
            frm.txtProductName.Text       = dr.Cells[2].Value.ToString();
            frm.txtAvailableQuantity.Text = dr.Cells[4].Value.ToString();
            frm.txtUnitPrice.Text         = dr.Cells[5].Value.ToString();
            frm.labelm.Text = labelg.Text;
        }
示例#3
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                DataGridViewRow dr = dataGridView1.SelectedRows[0];

                this.Dispose();
                Quotation frm = new Quotation();
                frm.Show();
                frm.txtClientId.Text   = dr.Cells[0].Value.ToString();
                frm.txtClientName.Text = dr.Cells[1].Value.ToString();
                frm.labelm.Text        = labeln.Text;
                frm.dateTimePicker1.Focus();
                //frm.txtAttention.Focus();
                // this.Dispose();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (ftype == 1)
            {
                try
                {
                    DataGridViewRow dr = dataGridView1.SelectedRows[0];

                    this.Dispose();
                    QuotationForOvercease frm = new QuotationForOvercease();
                    frm.Show();
                    frm.txtClientId.Text         = dr.Cells[0].Value.ToString();
                    frm.txtClientName.Text       = dr.Cells[1].Value.ToString();
                    frm.labelm.Text              = labeln.Text;
                    frm.BrandcomboBox.Enabled    = true;
                    frm.txtOProductId.Enabled    = false;
                    frm.txtOSProductName.Enabled = false;
                    frm.groupBox3.Enabled        = false;
                    frm.groupBox2.Enabled        = false;
                    frm.groupBox7.Enabled        = false;
                    frm.dateTimePicker1.Focus();
                    //frm.txtAttention.Focus();
                    // this.Dispose();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else if (ftype == 3)
            {
                try
                {
                    DataGridViewRow dr = dataGridView1.SelectedRows[0];

                    this.Dispose();
                    Quotation frm = new Quotation();
                    frm.Show();
                    frm.txtClientId.Text        = dr.Cells[0].Value.ToString();
                    frm.txtClientName.Text      = dr.Cells[1].Value.ToString();
                    frm.labelm.Text             = labeln.Text;
                    frm.BrandcomboBox.Enabled   = true;
                    frm.txtProId.Enabled        = false;
                    frm.txtSProductName.Enabled = false;
                    frm.groupBox3.Enabled       = false;
                    frm.groupBox2.Enabled       = false;
                    frm.groupBox7.Enabled       = false;
                    frm.dateTimePicker1.Focus();
                    //frm.txtAttention.Focus();
                    // this.Dispose();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else if (ftype == 2)
            {
                try
                {
                    DataGridViewRow dr = dataGridView1.SelectedRows[0];

                    this.Dispose();
                    QuotationForCustom frm = new QuotationForCustom();
                    frm.Show();
                    frm.txtClientId.Text      = dr.Cells[0].Value.ToString();
                    frm.txtClientName.Text    = dr.Cells[1].Value.ToString();
                    frm.BrandcomboBox.Enabled = true;
                    frm.groupBox3.Enabled     = false;
                    frm.groupBox2.Enabled     = false;
                    frm.groupBox7.Enabled     = false;
                    frm.labelm.Text           = labeln.Text;
                    frm.dateTimePicker1.Focus();
                    //frm.txtAttention.Focus();
                    // this.Dispose();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else if (ftype == 4)
            {
                try
                {
                    DataGridViewRow dr = dataGridView1.SelectedRows[0];

                    this.Dispose();
                    QuotationMMix frm = new QuotationMMix();
                    frm.Show();

                    frm.txtClientId.Text   = dr.Cells[0].Value.ToString();
                    frm.txtClientName.Text = dr.Cells[1].Value.ToString();
                    frm.labelm.Text        = labeln.Text;
                    frm.dateTimePicker1.Focus();
                    //frm.txtAttention.Focus();
                    // this.Dispose();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }