Esempio n. 1
0
    protected void trvwDepartment_SelectedNodeChanged(object sender, System.EventArgs e)
    {
        PtYhmcBll ptYhmcBll     = new PtYhmcBll();
        string    selectedValue = this.trvwDepartment.SelectedValue;

        this.gvwUser.DataSource = ptYhmcBll.GetAllModelByWhere(string.Format("where i_bmdm = {0} ", selectedValue));
        this.gvwUser.DataBind();
        foreach (GridViewRow gridViewRow in this.gvwUser.Rows)
        {
            CheckBox checkBox = new CheckBox();
            if (gridViewRow.Controls[0].FindControl("chk") is CheckBox)
            {
                checkBox = (gridViewRow.Controls[0].FindControl("chk") as CheckBox);
            }
            Label label = new Label();
            if (gridViewRow.Controls[1].FindControl("lblName") is Label)
            {
                label = (gridViewRow.Controls[1].FindControl("lblName") as Label);
            }
            if (ContractManage_ContractType_RoleControl.userCodes.Contains(label.ToolTip))
            {
                checkBox.Checked = true;
            }
        }
    }
Esempio n. 2
0
    protected void trvwDepartment_SelectedNodeChanged(object sender, System.EventArgs e)
    {
        PtYhmcBll ptYhmcBll     = new PtYhmcBll();
        string    selectedValue = this.trvwDepartment.SelectedValue;

        if (selectedValue != "1")
        {
            this.lbSelect.DataSource = ptYhmcBll.GetAllModelByWhere(string.Format("where state=1 and i_bmdm = {0} ", selectedValue));
        }
        else
        {
            this.lbSelect.DataSource = ptYhmcBll.GetAllModelByWhere(string.Format("where state=1 ", new object[0]));
        }
        this.lbSelect.DataBind();
        System.Collections.Generic.List <string> listFromJson = JsonHelper.GetListFromJson(JsonHelper.Serialize(JsonHelper.GetListFromJson(this.hfldUserCodes.Value).ToArray()));
        this.DataBindUserName(listFromJson);
    }
Esempio n. 3
0
    protected void btnQuery_Click(object sender, System.EventArgs e)
    {
        PtYhmcBll ptYhmcBll = new PtYhmcBll();

        this.lbSelect.DataSource = ptYhmcBll.GetAllModelByWhere(string.Format(" where v_xm like '%{0}%'", this.txtQuery.Text.Trim()));
        this.lbSelect.DataBind();
        System.Collections.Generic.List <string> listFromJson = JsonHelper.GetListFromJson(JsonHelper.Serialize(JsonHelper.GetListFromJson(this.hfldUserCodes.Value).ToArray()));
        this.DataBindUserName(listFromJson);
    }
Esempio n. 4
0
    protected void trvwDepartment_SelectedNodeChanged(object sender, System.EventArgs e)
    {
        System.Collections.Generic.List <string> listFromJson = JsonHelper.GetListFromJson(this.hfldUserCodes.Value);
        PtYhmcBll ptYhmcBll     = new PtYhmcBll();
        string    selectedValue = this.trvwDepartment.SelectedValue;

        this.gvwUser.DataSource = ptYhmcBll.GetAllModelByWhere(string.Format("where i_bmdm = {0}", selectedValue));
        this.gvwUser.DataBind();
        this.DataBindUser(listFromJson);
        this.DataBindUserName(listFromJson);
    }
Esempio n. 5
0
    protected void btnQuery_Click(object sender, System.EventArgs e)
    {
        PtYhmcBll ptYhmcBll = new PtYhmcBll();

        this.lbSelect.DataSource = ptYhmcBll.GetAllModelByWhere(string.Format("where state=1 and  v_xm like '%{0}%'", this.txtQuery.Text.Trim()));
        this.lbSelect.DataBind();
        if (!string.IsNullOrEmpty(this.hfldUserCodes.Value.Trim()))
        {
            System.Collections.Generic.List <string> @string = this.GetString(this.hfldUserCodes.Value);
            this.DataBindUserName(@string);
        }
    }
Esempio n. 6
0
    protected void trvwDepartment_SelectedNodeChanged(object sender, System.EventArgs e)
    {
        PtYhmcBll ptYhmcBll     = new PtYhmcBll();
        string    selectedValue = this.trvwDepartment.SelectedValue;

        this.lbSelect.DataSource = ptYhmcBll.GetAllModelByWhere(string.Format("where state=1 and i_bmdm = {0} ", selectedValue));
        this.lbSelect.DataBind();
        if (this.hfldUserCodes.Value != "")
        {
            System.Collections.Generic.List <string> @string = this.GetString(this.hfldUserCodes.Value);
            this.DataBindUserName(@string);
        }
    }
Esempio n. 7
0
    protected void btnQuery_Click(object sender, EventArgs e)
    {
        PtYhmcBll ptYhmcBll = new PtYhmcBll();

        this.lbSelect.DataSource = ptYhmcBll.GetAllModelByWhere(string.Format("where state=1 and v_xm LIKE '%{0}%' ", this.txtQuery.Text.Trim()));
        this.lbSelect.DataBind();
        List <string> listFromJson = JsonHelper.GetListFromJson(JsonHelper.Serialize(JsonHelper.GetListFromJson(this.hfldUserCodes.Value).ToArray()));

        if (listFromJson.Count > 0)
        {
            this.DataBindUserName(listFromJson);
        }
    }