Exemple #1
0
        private void FrmLuong_Load(object sender, EventArgs e)
        {
            model = new LuongModel();
            model.setControl(dataGridView1, lblMessage);

            model.getAllData("LUONG_CO_BAN DESC");


            model.ShowDetail(ShowDetail);

            validate.SetTooltip(toolTip1);

            if (CurrentRowSelected != null)
            {
                dataGridView1.ClearSelection();
                foreach (DataGridViewRow row in dataGridView1.Rows)
                {
                    if (row.Cells[0].Value.ToString().Equals(CurrentRowSelected))
                    {
                        row.Cells[0].Selected = true;
                    }
                }
                dataGridView1.DoubleClick += new EventHandler(dataGridView1_DoubleClick);
            }

            ShowDetail(dataGridView1.CurrentRow);
        }
Exemple #2
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     model.getAllData("LUONG_CO_BAN DESC", validate.formatPrice(txtKey.Text.Trim()));
     button1.Enabled = true;
     ShowDetail(dataGridView1.CurrentRow);
 }