Beispiel #1
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                var dr = dataGridView1.SelectedRows[0];
                Hide();
                var obj = new frmConfig();


                obj.Show();
                obj.txtConfigID.Text    = dr.Cells[0].Value.ToString();
                obj.cmbProductName.Text = dr.Cells[1].Value.ToString();
                obj.txtFeatures.Text    = dr.Cells[2].Value.ToString();
                obj.txtPrice.Text       = dr.Cells[3].Value.ToString();
                var data = (byte[])dr.Cells[4].Value;
                var ms   = new MemoryStream(data);
                obj.pictureBox1.Image = Image.FromStream(ms);
                obj.btnUpdate.Enabled = true;
                obj.btnDelete.Enabled = true;
                obj.btnSave.Enabled   = false;
                obj.cmbProductName.Focus();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ล้มเหลว", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
        private void frmConfigRecord_FormClosing(object sender, FormClosingEventArgs e)
        {
            Hide();
            var frm = new frmConfig();

            frm.Show();
        }
Beispiel #3
0
 private void configurationToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var frm = new frmConfig();
     frm.Show();
 }
Beispiel #4
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                var dr = dataGridView1.SelectedRows[0];
                Hide();
                var obj = new frmConfig();


                obj.Show();
                obj.txtConfigID.Text = dr.Cells[0].Value.ToString();
                obj.cmbProductName.Text = dr.Cells[1].Value.ToString();
                obj.txtFeatures.Text = dr.Cells[2].Value.ToString();
                obj.txtPrice.Text = dr.Cells[3].Value.ToString();
                var data = (byte[])dr.Cells[4].Value;
                var ms = new MemoryStream(data);
                obj.pictureBox1.Image = Image.FromStream(ms);
                obj.btnUpdate.Enabled = true;
                obj.btnDelete.Enabled = true;
                obj.btnSave.Enabled = false;
                obj.cmbProductName.Focus();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ล้มเหลว", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #5
0
 private void frmConfigRecord_FormClosing(object sender, FormClosingEventArgs e)
 {
     Hide();
     var frm = new frmConfig();
     frm.Show();
 }
Beispiel #6
0
        private void configurationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var frm = new frmConfig();

            frm.Show();
        }