示例#1
0
    private void CreateCompanyTypeHTML(int UT_ID)
    {
        try
        {
            string str = "";
            string strlist = "";
            XYECOM.Business.UserType ut = new XYECOM.Business.UserType();
            XYECOM.Model.UserTypeInfo et = new XYECOM.Model.UserTypeInfo();
            if (UT_ID == 0)
            {
                str += "请选择企业类别";
                strlist += "<a href=\"#\" onclick=\"selectcompanytypelist(0,this);\">请选择企业类别</a>";
            }
            else
            {
                et = ut.GetItem(UT_ID);

                str += et.UT_Type.ToString();
                strlist += "<a href=\"#\" onclick=\"selectcompanytypelist(" + et.UT_ID.ToString() + ",this);\">" + et.UT_Type.ToString() + "</a>";
            }

            str += "$";
            DataTable dt;
            dt = ut.GetDataTable(UT_ID);
            DataTable dt1 = ut.GetDataTable(-1);

            if (dt.Rows.Count > 0)
            {
                strlist += " <ul class=\"subset\">";
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    str += "    <a href=\"#\" title=\"点击选择此项\" onclick=\"selectcompanytypeinfo(" + dt.Rows[i]["UT_ID"].ToString() + ",'" + dt.Rows[i]["UT_Type"].ToString() + "');\">" + dt.Rows[i]["UT_Type"].ToString() + "</a>";
                    strlist += "<li class=\"";
                    dt1.DefaultView.RowFilter = "UT_PID=" + dt.Rows[i]["UT_ID"].ToString();
                    DataView dv1 = dt1.DefaultView;
                    if (dv1.Count > 0)
                        strlist += "shrink\" ><a href=\"#\" onclick=\"selectcompanytypelist(" + dt.Rows[i]["UT_ID"].ToString() + ",this);\">" + dt.Rows[i]["UT_Type"].ToString() + "</a></li>";
                    else
                        strlist += "sublast\" >" + dt.Rows[i]["UT_Type"].ToString() + "</li>";

                }
                strlist += "</ul>";
            }
            else
            {
                str += " ";
            }
            str += "$";
            str += strlist;
            Response.Write(str);
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message.Replace("\n", ""));
        }
    }
示例#2
0
    private void InitCompanyTypeListHTML()
    {
        string str = "";
        string strlist = "";
        XYECOM.Business.UserType ut = new XYECOM.Business.UserType();
        DataTable dt = ut.GetDataTable(0);
        DataTable dt1 = ut.GetDataTable(-1);
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strlist += "    <a href=\"#\" title=\"点击选择此项\" onclick=\"selectcompanytypeinfo(" + dt.Rows[i]["UT_ID"].ToString() + ",'" + dt.Rows[i]["UT_Type"].ToString() + "');\">" + dt.Rows[i]["UT_Type"].ToString() + "</a>";
            str += "<li class=\"";
            dt1.DefaultView.RowFilter = "UT_PID=" + dt.Rows[i]["UT_ID"].ToString();
            DataView dv1 = dt1.DefaultView;
            if (dv1.Count > 0)
                str += "shrink\" ><a href=\"#\" onclick=\"selectcompanytypelist(" + dt.Rows[i]["UT_ID"].ToString() + ",this);\">" + dt.Rows[i]["UT_Type"].ToString() + "</a></li>";
            else
                str += "sublast\" >" + dt.Rows[i]["UT_Type"].ToString() + "</li>";

        }

        str = str.Insert(0, strlist + "$");

        System.Web.HttpContext.Current.Response.Write(str);
    }
示例#3
0
    private void InitPage()
    {
        if (this.Request.QueryString["UT_PID"] != null && this.Request.QueryString["UT_PID"].ToString() != "")
        {
            if (Request.QueryString["UT_PID"].ToString() != "0")
            {
                XYECOM.Business.UserType ut = new XYECOM.Business.UserType();

                long typeId = XYECOM.Core.XYRequest.GetQueryInt64("UT_PID");

                DataTable dt = ut.GetDataTable(typeId);

                if (dt.Rows.Count > 0)
                {
                    lblName.Text = dt.Rows[0]["UT_Type"].ToString();
                }
            }
            else
                lblName.Text = "一级企业类型";
            UT_PID = Convert.ToInt64(Request.QueryString["UT_PID"].ToString());
        }
        if (this.Request.QueryString["UT_ID"] != null && this.Request.QueryString["UT_ID"].ToString() != "")
        {
            XYECOM.Business.UserType ut = new XYECOM.Business.UserType();
            XYECOM.Model.UserTypeInfo eu = new XYECOM.Model.UserTypeInfo();

            eu = ut.GetItem(Convert.ToInt64(this.Request.QueryString["UT_ID"].ToString()));

            UT_ID = eu.UT_ID;
            this.tbName.Text = eu.UT_Type;
             UT_PID = eu.UT_PID;
            if (UT_PID != 0)
            {
                eu = ut.GetItem(UT_PID);
                this.lblName.Text = eu.UT_Type;
            }
            else
            {
                this.lblName.Text = "一级企业类型";
            }
            this.lbremark.Visible = false;
            this.lblName.Text = "企业类型编辑";
        }
    }