예제 #1
0
        private void btn_save_Click(object sender, EventArgs e)
        {
            if (add_flag == true)
            {
                add_user();
            }
            else
            {
            }
            groupBox1.Enabled = false;
            用户表DAL dal1 = new 用户表DAL();

            usergrid.set_date(dal1.GetAllDataTable());
        }
예제 #2
0
        private void frm_maintain_user_Load(object sender, EventArgs e)
        {
            部门表DAL dal = new 部门表DAL();


            chk_admin.Text         = "管理组";
            cmb_dept.DataSource    = dal.GetUsedDataTableNoadmin();
            cmb_dept.ValueMember   = "id";
            cmb_dept.DisplayMember = "部门名称";



            用户表DAL dal1 = new 用户表DAL();

            usergrid.set_date(dal1.GetAllDataTable());
            usergrid.set_head_title(1, "工作证号");
            usergrid.set_head_title(2, "姓名");
            usergrid.set_head_title(3, "部门");
            usergrid.set_head_title(4, "禁用");

            usergrid.set_width(0, 0);
            usergrid.set_width(4, 40);

            usergrid.set_hide(0);

            groupBox1.Enabled = false;

            cmb_noused.Items.Add("启用");
            cmb_noused.Items.Add("禁用");

            txt_pwd.set_title("密码:");
            txt_pwd1.set_title("确认:");

            txt_username.set_title("姓名");
            txt_cardno.set_title("工作证:");

            txt_pwd.set_Pwdtype();
            txt_pwd1.set_Pwdtype();
        }