Exemplo n.º 1
0
        private void btn_search_employee_Click(object sender, EventArgs e)
        {
            frm_employee frm = new frm_employee();

            frm.Name = "search";
            DialogResult res = frm.ShowDialog();

            if (res == DialogResult.Cancel)
            {
                this.txt_emp_id.Text   = frm_employee.id;
                this.txt_emp_name.Text = frm_employee.name;
            }
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Connection con = new Connection();
            DataTable  dt;

            dt = new DataTable();
            dt = con.selectt("select priv_display from tb_priv where priv_screen_id=8 and priv_user_id='" + Main_Form.curnt_user + "';");

            if (dt.Rows[0][0].ToString() == "False" || dt.Rows[0][0].ToString() == string.Empty)
            {
            }
            else
            {
                frm_employee frm = new frm_employee();
                frm.ShowDialog();
            }
        }