コード例 #1
0
    private void LoadComp()
    {
        var isSuccess = false;
        var msg       = "";
        var datas     = new List <DropDownListMobel>();
        var viewData  = new WorkTimeViewModel()
        {
            UserComp = UserInfo.getUserInfo().CompID,
            UserID   = UserInfo.getUserInfo().UserID
        };

        isSuccess = WorkTime.LoadBothComp(viewData, out datas, out msg);
        if (isSuccess && datas != null && datas.Count > 0)
        {
            ddlCompID.DataSource     = datas;
            ddlCompID.DataTextField  = "DataText";
            ddlCompID.DataValueField = "DataValue";
            ddlCompID.DataBind();

            _IsBoss       = true;
            plPer.Visible = false;
        }
        else
        {
            _IsBoss         = false;
            plOrg.Visible   = false;
            txtCompID.Text  = UserInfo.getUserInfo().CompName;
            txtDeptID.Text  = UserInfo.getUserInfo().DeptName;
            txtOrganID.Text = UserInfo.getUserInfo().OrganName;

            DoQuery();
        }
    }