public Frm_UserAdd(String title, Fuser qxgl, int roleid) { InitializeComponent(); this.qxgl = qxgl; this.roleid = roleid; this.Text = title + "组--添加用户"; string sql = "SELECT RoleID AS 编号, RoleName AS 名称, RoleMemo AS 备注 FROM tRole where roleid = '" + roleid + "'"; tRoleTA1 = new SqlDataAdapter(sql, conn); tRoleTA1.Fill(ds, "tRole"); textBox1.Text = ds.Tables["tRole"].Rows[0]["名称"].ToString(); textBox2.Text = ds.Tables["tRole"].Rows[0]["备注"].ToString(); // tRoleTA1.Fill(ds, "tRole") //tRoleTA1.FillBy1(dm1.tRole, roleid); this.viewchang(); }
private void qxgl_Click(object sender, EventArgs e) { foreach (Form forms in this.MdiChildren) { if (forms is Fuser) { forms.Focus(); forms.WindowState = FormWindowState.Maximized; return; } } Fuser user = new Fuser(this); user.MdiParent = this; user.WindowState = FormWindowState.Maximized; user.Show(); }
public Frm_Crole(String title, int roleid, Fuser qxgl, int lx) { InitializeComponent(); this.lx = lx; this.qxgl = qxgl; this.Text = title + "组--权限"; // RoleName.Text = title; this.roleid = roleid.ToString(); //button3.Visible = false; button1.Enabled = true; //tRoleTA1.FillBy1(dm1.tRole, roleid); string sql = "SELECT RoleID AS 编号, RoleName AS 名称, RoleMemo AS 备注 FROM tRole where roleid ='" + roleid + "' "; tRoleTA1 = new SqlDataAdapter(sql, conn); try { dm1.Tables["tRole"].Clear(); } catch { } tRoleTA1.Fill(dm1, "tRole"); sb = new SqlCommandBuilder(tRoleTA1); RoleName.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dm1, "tRole.名称", true)); RoleMemo.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dm1, "tRole.备注", true)); // RoleName.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bindingSource1, "名称", true)); // RoleMemo.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bindingSource1, "备注", true)); // RoleMemo.Text = dm1.Tables["tRole"].Rows[0]["备注"].ToString(); this.viewchang(); }
public Frm_Crole(Fuser qxgl, int lx) { InitializeComponent(); this.qxgl = qxgl; this.lx = lx; }