Esempio n. 1
0
 private void frmConfigRecord_FormClosing(object sender, FormClosingEventArgs e)
 {
     Hide();
     var frm = new frmStock();
     frm.label8.Text = label1.Text;
     frm.Show();
 }
Esempio n. 2
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                var dr = dataGridView1.SelectedRows[0];
                Hide();
                var frm = new frmStock();
                frm.Show();
                frm.txtStockID.Text     = dr.Cells[0].Value.ToString();
                frm.txtConfigID.Text    = dr.Cells[1].Value.ToString();
                frm.txtProductname.Text = dr.Cells[2].Value.ToString();
                frm.txtFeatures.Text    = dr.Cells[3].Value.ToString();
                frm.txtPrice.Text       = dr.Cells[4].Value.ToString();
                frm.txtQty.Text         = dr.Cells[5].Value.ToString();
                frm.txtTotalPrice.Text  = dr.Cells[6].Value.ToString();
                frm.dtpStockDate.Text   = dr.Cells[7].Value.ToString();
                frm.btnUpdate.Enabled   = true;
                frm.btnDelete.Enabled   = true;
                frm.btnSave.Enabled     = false;
                frm.label8.Text         = label1.Text;
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ล้มเหลว", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 3
0
        private void frmStockRecord_FormClosing(object sender, FormClosingEventArgs e)
        {
            Hide();
            var frm = new frmStock();

            frm.label8.Text = label1.Text;
            frm.Show();
        }
Esempio n. 4
0
        private void stockToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Hide();
            var frm = new frmStock();

            frm.label8.Text = lblUser.Text;
            frm.Show();
        }
Esempio n. 5
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                var dr = dataGridView1.SelectedRows[0];
                Hide();

                var frm = new frmStock();
                frm.Show();
                frm.txtConfigID.Text    = dr.Cells[0].Value.ToString();
                frm.txtProductname.Text = dr.Cells[1].Value.ToString();
                frm.txtFeatures.Text    = dr.Cells[2].Value.ToString();
                frm.txtPrice.Text       = dr.Cells[3].Value.ToString();
                frm.label8.Text         = label1.Text;
                frm.txtQty.Focus();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ล้มเหลว", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 6
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                var dr = dataGridView1.SelectedRows[0];
                Hide();
                var frm = new frmStock();
                frm.Show();
                frm.txtStockID.Text = dr.Cells[0].Value.ToString();
                frm.txtConfigID.Text = dr.Cells[1].Value.ToString();
                frm.txtProductname.Text = dr.Cells[2].Value.ToString();
                frm.txtFeatures.Text = dr.Cells[3].Value.ToString();
                frm.txtPrice.Text = dr.Cells[4].Value.ToString();
                frm.txtQty.Text = dr.Cells[5].Value.ToString();
                frm.txtTotalPrice.Text = dr.Cells[6].Value.ToString();
                frm.dtpStockDate.Text = dr.Cells[7].Value.ToString();
                frm.btnUpdate.Enabled = true;
                frm.btnDelete.Enabled = true;
                frm.btnSave.Enabled = false;
                frm.label8.Text = label1.Text;
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ล้มเหลว", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 7
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                var dr = dataGridView1.SelectedRows[0];
                Hide();

                var frm = new frmStock();
                frm.Show();
                frm.txtConfigID.Text = dr.Cells[0].Value.ToString();
                frm.txtProductname.Text = dr.Cells[1].Value.ToString();
                frm.txtFeatures.Text = dr.Cells[2].Value.ToString();
                frm.txtPrice.Text = dr.Cells[3].Value.ToString();
                frm.label8.Text = label1.Text;
                frm.txtQty.Focus();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ล้มเหลว", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 8
0
 private void stockToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Hide();
     var frm = new frmStock();
     frm.label8.Text = lblUser.Text;
     frm.Show();
 }