Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //注册ajax
        strUrl = IndustryPlatform.Common.SystemConfig.StartUrl;
        OutScriptUrl();//输出js
        sysid = Request.QueryString["sysid"];
        if (sysid == null || sysid == "")
        {
            sysid = "s0002";
        }
        CookieManager.AppendCookie("Sys", sysid);

        if (!Page.IsPostBack)
        {
            IndustryPlatform.Model.SYS_MenuEntity menu = new IndustryPlatform.BLL.SYS_Menu().GetModel(sysid);
            if (menu != null)
            {
                this.lbSys.Text = menu.MenuName;
            }
            DataSet         ds      = new DataSet();
            SYS_OperatorBll operbll = new SYS_OperatorBll();
            ds = operbll.GetOperatorInfo(CookieManager.GetCookieValue("uid"));
            this.lbUserName.Text = ds.Tables[0].Rows[0]["UserName"].ToString();

            BindTree(sysid);
        }
    }
    public void OperInfoBind(string strid)
    {
        if (CookieManager.GetCookieValue("uid").ToString() != "0")
        {
            IndustryPlatform.Model.SYS_Organization m = bll.GetModel(CookieManager.GetCookieValue("orgID"));
            strSeq = m.OrgSeq;
            pid    = m.ParentOrgCode.ToString();
            string strOrgType = m.OrgType;
            if (strOrgType == "1")
            {
                lblTypeCode.Text = "选择磅房:";
                ControlBindHelper.DropDownListBind(this.ddl_TypeCode, "TT_Room", "RoomName", "RoomCode", "IsForbid='0'", "请选择磅房", "");
            }
            else if (strOrgType == "2")
            {
                lblTypeCode.Text = "选择煤矿:";
                ControlBindHelper.DropDownListBind(this.ddl_TypeCode, "Sys_Colliery", "CollName", "CollCode", "IsForbid='0'", "请选择煤矿", "");
            }
            if (strOrgType == "1" || strOrgType == "2")
            {
                this.ddl_TypeCode.Visible = true;
                tdTypeCode.Visible        = true;
            }
            else
            {
                this.ddl_TypeCode.Visible = false;
                this.ddl_TypeCode.Items.Clear();
                this.ddl_TypeCode.Items.Add(new ListItem("1", ""));
            }
        }
        bll.OrgDllBind(this.ddl_parentOrgID, strSeq, pid);
        DataSet ds = new DataSet();

        ds = operbll.GetOperatorInfo(strid);

        this.rblist_sex.Items.FindByValue(ds.Tables[0].Rows[0]["Gender"].ToString()).Selected = true;
        this.txt_address.Text = ds.Tables[0].Rows[0]["Address"].ToString();

        //this.rblist_local.Items.FindByValue(ds.Tables[0].Rows[0]["isLocal"].ToString()).Selected = true;

        this.txt_mobile.Text = ds.Tables[0].Rows[0]["MobileNo"].ToString();
        this.txt_email.Text  = ds.Tables[0].Rows[0]["Email"].ToString();
        this.ddl_parentOrgID.SelectedValue = ds.Tables[0].Rows[0]["OrgCode"].ToString();
        ddl_parentOrgID_SelectedIndexChanged(null, null);
        if (ddl_TypeCode.Visible)
        {
            ddl_TypeCode.SelectedValue = ds.Tables[0].Rows[0]["TypeCode"].ToString();
        }

        this.txt_tel.Text = ds.Tables[0].Rows[0]["Tel"].ToString();

        this.txt_pid.Text      = ds.Tables[0].Rows[0]["PID"].ToString();
        this.txt_username.Text = ds.Tables[0].Rows[0]["UserName"].ToString();
        this.zipcode.Text      = ds.Tables[0].Rows[0]["ZipCode"].ToString();
    }