Example #1
0
        /// <summary>
        /// �Է������ת��
        /// </summary>
        /// <param name="ename">ģ������</param>
        /// <param name="pt_parentID">����ID</param>
        /// <param name="flag">flag:0 ��ת�Ƶ����� flag:1 ����Ϊ����</param>
        private void Move(String ename, long lngMoveTypeId, String flag)
        {
            int err = 0;

            if (ename.Equals("job") || ename.Equals("exhibition"))
            {
                if (ename.Equals("job"))
                {
                    postinfo = post.GetItem(Convert.ToInt32(lngMoveTypeId));
                    XYECOM.Model.PostInfo info = new XYECOM.Model.PostInfo();
                    info.P_ID = postinfo.P_ID;
                    info.P_Name = postinfo.P_Name;
                    if (toTypeId.Equals(lngMoveTypeId))
                    {
                        info.P_ParentID = postinfo.P_ParentID;
                    }
                    else
                    {
                        info.P_ParentID = Convert.ToInt32(toTypeId);
                    }
                    if (flag.Equals("1"))
                    {
                        info.P_ParentID = 0;
                    }
                    err = post.Update(info);
                }
                if (ename.Equals("exhibition"))
                {
                    showinfo = showtype.GetItem(lngMoveTypeId);
                    XYECOM.Model.ShowTypeInfo info = new XYECOM.Model.ShowTypeInfo();
                    info.SHT_Name = showinfo.SHT_Name;

                    if (toTypeId.Equals(lngMoveTypeId))
                    {
                        info.SHT_ParentID = showinfo.SHT_ParentID;
                    }
                    else
                    {
                        info.SHT_ParentID = toTypeId;
                    }
                    if (flag.Equals("1"))
                    {
                        info.SHT_ParentID = 0;
                    }
                    info.SHT_ID = showinfo.SHT_ID;
                    err = showtype.Update(info);
                }
            }
            else
            {
                if (ename.Equals("offer") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("offer"))
                {
                    proTypeInfo = proTypeBLL.GetItem(lngMoveTypeId);

                    if (flag.Equals("1"))
                    {
                        proTypeInfo.PT_ParentID = 0;
                    }
                    else
                    {
                        if (toTypeId != lngMoveTypeId)
                        {
                            Model.ProductTypeInfo _tempInfo = proTypeBLL.GetItem(toTypeId);

                            if (_tempInfo != null) proTypeInfo.TradeId = _tempInfo.TradeId;

                            proTypeInfo.PT_ParentID = toTypeId;
                        }
                    }

                    err = proTypeBLL.Update(proTypeInfo);

                }

                if (ename.Equals("investment") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("investment"))
                {
                    iti = it.GetItem(lngMoveTypeId);
                    XYECOM.Model.InviteBusinessTypeInfo info = new XYECOM.Model.InviteBusinessTypeInfo();
                    info.IT_Name = iti.IT_Name;

                    if (toTypeId.Equals(lngMoveTypeId))
                    {
                        info.IT_ParentID = iti.IT_ParentID;
                    }
                    else
                    {
                        info.IT_ParentID = toTypeId;
                    }
                    if (flag.Equals("1"))
                    {
                        info.IT_ParentID = 0;
                    }
                    info.ModuleName = iti.ModuleName;
                    info.IT_ID = iti.IT_ID;
                    err = it.Update(info);
                }
                if (ename.Equals("service") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("service"))
                {
                    sti = st.GetItem(lngMoveTypeId);
                    XYECOM.Model.ServiceTypeInfo info = new XYECOM.Model.ServiceTypeInfo();
                    info.ST_Name = sti.ST_Name;

                    if (toTypeId.Equals(lngMoveTypeId))
                    {
                        info.ST_ParentID = sti.ST_ParentID;
                    }
                    else
                    {
                        info.ST_ParentID = toTypeId;
                    }
                    if (flag.Equals("1"))
                    {
                        info.ST_ParentID = 0;
                    }
                    info.ModuleName = sti.ModuleName;
                    info.ST_ID = sti.ST_ID;
                    err = st.Update(info);
                }
            }

            if (err > 0)
            {
                Response.Redirect("Typelist.aspx?ename=" + ename + "&orderid=" + lngMoveTypeId);
            }
            else
            {
                this.lblMessage.Text = "ת��ʧ�ܣ�";
            }
        }
Example #2
0
    private void pageinit()
    {
        if (XYECOM.Core.XYRequest.GetQueryString("pt_id").Equals("0"))
        {
            lblName.Text = "�����";
            this.module.Visible = true;
            this.module2.Visible = true;
        }
        //ģ������
        ename = XYECOM.Core.XYRequest.GetQueryString("ename");

        switch (ename)
        {
            case "venture":
                lblType.Text = "�ӹ���Ϣ";
                break;
            case "investment":
                lblType.Text = "���̴���";
                break;
            case "service":
                lblType.Text = "������Ϣ";
                break;
            case "brand":
                lblType.Text = "Ʒ�Ʒ���";
                break;
            case "job":
                lblType.Text = "��Ƹ��λ";
                break;
            case "exhibition":
                lblType.Text = "չ�����";
                break;
            case "pifa":
                lblType.Text = "������Ϣ";
                break;
        }

        //type:0��� / type:1�༭
        type = XYECOM.Core.XYRequest.GetQueryString("type");

        if (ename.Equals(""))
        {
            ename = "venture";
        }

        pt_id = XYECOM.Core.XYRequest.GetQueryString("pt_id");

        int parentId = XYECOM.Core.MyConvert.GetInt32(pt_id);

        #region �����������
        if (type.Equals("0"))
        {
            if (ename.Equals("job") || ename.Equals("exhibition"))
            {
                if (ename.Equals("job") && pt_id != "0")
                {
                    postinfo = post.GetItem(parentId);
                    lblName.Text = GetTypeAllName(ename, postinfo.P_ID);
                }
                if ((ename.Equals("exhibition") && pt_id != "0"))
                {
                    showinfo = showtype.GetItem(parentId);
                    lblName.Text = GetTypeAllName(ename, showinfo.SHT_ID);
                }
            }
            else
            {
                if ((ename.Equals("investment") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("investment")) && pt_id != "0")
                {
                    iti = it.GetItem(parentId);
                    lblName.Text = GetTypeAllName(ename, iti.IT_ID);
                }
                if ((ename.Equals("service") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("service")) && pt_id != "0")
                {
                    sti = st.GetItem(parentId);
                    lblName.Text = GetTypeAllName(ename, sti.ST_ID);
                }
            }
        }
        #endregion

        #region ���ر༭���
        if (type.Equals("1"))
        {

            lbremark.Visible = false;
            tbName.TextMode = TextBoxMode.SingleLine;

            if (ename.Equals("job") || ename.Equals("exhibition"))
            {
                if (ename.Equals("job") && pt_id != "0")
                {
                    postinfo = post.GetItem(Convert.ToInt32(pt_id));
                    PT_ID = postinfo.P_ID;
                    this.tbName.Text = postinfo.P_Name;
                    this.PT_ParentID = postinfo.P_ParentID;
                    if (PT_ParentID != 0)
                    {
                        postinfo = post.GetItem(Convert.ToInt32(PT_ParentID));
                        lblName.Text = GetTypeAllName(ename, postinfo.P_ID);
                    }
                    else
                    {
                        this.lblName.Text = "һ�����";
                    }
                }
                if ((ename.Equals("exhibition") && pt_id != "0"))
                {
                    showinfo = showtype.GetItem(Convert.ToInt64(pt_id));
                    PT_ID = showinfo.SHT_ID;
                    this.tbName.Text = showinfo.SHT_Name;
                    this.PT_ParentID = showinfo.SHT_ParentID;
                    if (PT_ParentID != 0)
                    {
                        showinfo = showtype.GetItem(PT_ParentID);
                        lblName.Text = GetTypeAllName(ename, showinfo.SHT_ID);
                    }
                    else
                    {
                        this.lblName.Text = "һ�����";
                    }
                }
            }
            else
            {
                if ((ename.Equals("investment") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("investment")) && pt_id != "0")
                {
                    iti = it.GetItem(Convert.ToInt64(pt_id));
                    PT_ID = iti.IT_ID;
                    this.tbName.Text = iti.IT_Name;
                    this.PT_ParentID = iti.IT_ParentID;
                    if (PT_ParentID != 0)
                    {
                        iti = it.GetItem(PT_ParentID);
                        lblName.Text = GetTypeAllName(ename, iti.IT_ID);
                    }
                    else
                    {
                        this.lblName.Text = "һ�����";
                    }
                }
                if ((ename.Equals("service") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("service")) && pt_id != "0")
                {
                    sti = st.GetItem(Convert.ToInt64(pt_id));
                    PT_ID = sti.ST_ID;
                    this.tbName.Text = sti.ST_Name;
                    this.PT_ParentID = sti.ST_ParentID;
                    if (PT_ParentID != 0)
                    {
                        sti = st.GetItem(PT_ParentID);
                        lblName.Text = GetTypeAllName(ename, sti.ST_ID);
                    }
                    else
                    {
                        this.lblName.Text = "һ�����";
                    }
                }
            }
        }
        #endregion
    }
Example #3
0
    protected void btnok_Click(object sender, EventArgs e)
    {
        PT_ID = XYECOM.Core.MyConvert.GetInt64(XYECOM.Core.XYRequest.GetQueryString("pt_id"));
        ename = XYECOM.Core.XYRequest.GetQueryString("ename");

        if (this.tbName.Text == "")
        {
            Alert("�������Ʋ���Ϊ�գ�");
            return;
        }
        type = XYECOM.Core.XYRequest.GetQueryString("type");

        //�ж�����ӱ��滹�DZ༭����
        if (type.Equals("0") || XYECOM.Core.XYRequest.GetQueryString("pt_id").Equals("0"))
        {

            string TypeName = tbName.Text.Trim().Replace("��", ",");

            string[] arr = TypeName.Split(',');

            for (int i = 0; i < arr.Length; i++)
            {
                InsertData(arr[i].Trim());

                if (error) continue;
            }

            if (!error)
                Response.Redirect("Typelist.aspx?ename=" + ename + "&orderid=" + PT_ID + "&add=1");
        }

        if (type.Equals("1"))
        {
            int err = 0;

            if (ename.Equals("job") || ename.Equals("exhibition"))
            {
                if (ename.Equals("job"))
                {
                    postinfo = post.GetItem((int)PT_ID);
                    postinfo.P_Name = this.tbName.Text.Trim();

                    err = post.Update(postinfo);
                }
                if (ename.Equals("exhibition"))
                {
                    showinfo = showtype.GetItem(PT_ID);
                    showinfo.SHT_Name = this.tbName.Text.Trim();

                    err = showtype.Update(showinfo);
                }
            }
            else
            {
                if (ename.Equals("investment") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("investment"))
                {
                    iti = it.GetItem(PT_ID);
                    iti.IT_Name = this.tbName.Text.Trim();

                    err = it.Update(iti);
                }
                if (ename.Equals("service") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("service"))
                {
                    sti = st.GetItem(PT_ID);
                    sti.ST_Name = this.tbName.Text.Trim();

                    err = st.Update(sti);
                }
            }
            if (err > 0)
            {
                Response.Redirect("Typelist.aspx?ename=" + ename + "&orderid=" + PT_ID);
            }
            else
            {
                Alert("�޸�ʧ�ܣ�", backUrl + "?orderid=" + pt_id + "&ename=" + XYECOM.Core.XYRequest.GetQueryString("ename"));
            }
        }
    }
Example #4
0
    private void CreatepostTypeHTML(int P_ID)
    {
        try
        {
            string str = "";
            string strlist = "";
            XYECOM.Model.PostInfo ep = new XYECOM.Model.PostInfo();
            XYECOM.Business.Post p = new XYECOM.Business.Post();
            if (P_ID == 0)
            {
                str += "请选择岗位名称";
                strlist += "<a href=\"#\" onclick=\"selecttypelist(0,this);\">请选择岗位名称</a>";
            }
            else
            {
                ep = p.GetItem(P_ID);
                str += ep.P_Name.ToString();
                strlist += "<a href=\"#\" onclick=\"selecttypelist(" + ep.P_ID.ToString() + ",this);\">" + ep.P_Name.ToString() + "</a>";
            }
            str += "$";
            DataTable dt;
            dt = p.GetDataTable(P_ID);
            DataTable dt1 = p.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=\"selecttypeinfo(" + dt.Rows[i]["P_ID"].ToString() + ",'" + dt.Rows[i]["P_Name"].ToString() + "');\">" + dt.Rows[i]["P_Name"].ToString() + "</a>";
                    strlist += "<li class=\"";
                    dt1.DefaultView.RowFilter = "P_ParentID=" + dt.Rows[i]["P_ID"].ToString();
                    DataView dv1 = dt1.DefaultView;
                    if (dv1.Count > 0)
                        strlist += "shrink\" ><a href=\"#\" onclick=\"selecttypelist(" + dt.Rows[i]["P_ID"].ToString() + ",this);\">" + dt.Rows[i]["P_Name"].ToString() + "</a></li>";
                    else
                        strlist += "sublast\" >" + dt.Rows[i]["P_Name"].ToString() + "</li>";

                }
                strlist += "</ul>";
            }
            else
            {
                str += " ";
            }
            str += "$";
            str += strlist;
            Response.Write(str);
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message.Replace("\n", ""));
        }
    }