コード例 #1
0
ファイル: XYAjax.ashx.cs プロジェクト: xyecom/AMS
        /// <summary>
        /// 删除分类
        /// </summary>
        private void DelType()
        {
            string ename = F("moduleName");
            string infoId = F("infoid");
            long parmentId = L("parmentId");

            int i = 0;
            int j = 0;
            XYECOM.Business.XYClass xy = new XYECOM.Business.XYClass();

            if (ename.Equals("job") || ename.Equals("exhibition"))
            {
                if (ename.Equals("job"))
                {
                    XYECOM.Business.Post post = new Post();
                    j = xy.InfoNum("i_engageinfo", "P_ID", infoId);
                    if (j <= 0)
                    {
                        i = post.Delete(infoId);
                    }
                }
                else if (ename.Equals("exhibition"))
                {
                    XYECOM.Business.ShowType showtype = new XYECOM.Business.ShowType(); ;
                    j = xy.InfoNum("XY_showinfo", "typeid", infoId);
                    if (j <= 0)
                    {
                        i = showtype.Delete(infoId);
                    }
                }

            }
            else
            {
                if (ename.Equals("offer") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("offer"))
                {
                    XYECOM.Business.ProductType pt = new XYECOM.Business.ProductType();
                    j = xy.InfoNum("i_supply", "PT_ID", infoId);
                    if (j <= 0)
                    {
                        i = pt.Delete(infoId);
                    }
                }
                else if (ename.Equals("investment") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("investment"))
                {
                    XYECOM.Business.InviteBusinessType it = new XYECOM.Business.InviteBusinessType();
                    j = xy.InfoNum("i_invitebusinessmaninfo", "IT_ID", infoId);
                    if (j <= 0)
                    {
                        i = it.Delete(infoId);
                    }
                }
                else if (ename.Equals("service") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("service"))
                {
                    XYECOM.Business.ServiceType st = new XYECOM.Business.ServiceType(); ;
                    j = xy.InfoNum("i_serviceinfo", "ST_ID", infoId);
                    if (j <= 0)
                    {
                        i = st.Delete(infoId);
                    }
                }

            }
            if (j > 0)
            {
                ResponseXML(Result.Failed, "该分类下含有信息!");
                return;
            }
            if (i > 0)
            {
                ResponseXML(Result.Success, "删除成功");
                return;
            }
        }
コード例 #2
0
ファイル: GetTreeType.aspx.cs プロジェクト: xyecom/AMS
    void initSuogateTypeInnerHTML()
    {
        string str = "";
        string strlist = "";
        XYECOM.Business.InviteBusinessType it = new XYECOM.Business.InviteBusinessType();
        DataTable dt = it.GetDataTable(" where IT_ParentID=0", "");
        DataTable dt1 = it.GetDataTable(" where 1=1 ", "");

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            str += "<li class=\"";
            strlist += "    <a href=\"#\" title=\"点击选择此项\" onclick=\"selectsuogateypeinfo(" + dt.Rows[i]["IT_ID"].ToString() + ",'" + dt.Rows[i]["IT_Name"].ToString() + "');\">" + dt.Rows[i]["IT_Name"].ToString() + "</a>";

            dt1.DefaultView.RowFilter = "IT_ParentID=" + dt.Rows[i]["IT_ID"].ToString();
            DataView dv1 = dt1.DefaultView;
            if (dv1.Count > 0)
                str += "shrink\" ><a href=\"#\" onclick=\"selectsuogateype(" + dt.Rows[i]["IT_ID"].ToString() + ",this);\">" + dt.Rows[i]["IT_Name"].ToString() + "</a></li>";
            else
                str += "sublast\" >" + dt.Rows[i]["IT_Name"].ToString() + "</li>";

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

        System.Web.HttpContext.Current.Response.Write(str);
    }
コード例 #3
0
ファイル: TypeList.aspx.cs プロジェクト: xyecom/AMS
    /// <summary>
    /// ɾ��
    /// </summary>
    /// <param name="id"></param>
    private void Del(String id)
    {
        int i = 0;
        int j = 0;
        XYECOM.Business.XYClass xy = new XYECOM.Business.XYClass();

        if (id.Contains(","))
        {
            id = id.Substring(0, (id.Length - 1));
        }
        if (isfirstid.Equals("") || !isfirstid.Equals(id))
        {

            if (ename.Equals("job") || ename.Equals("exhibition"))
            {
                if (ename.Equals("job"))
                {
                    XYECOM.Business.Post post = new Post();
                    j = xy.InfoNum("i_engageinfo", "P_ID", id);
                    if (j <= 0)
                    {
                        i = post.Delete(id);
                    }
                }
                if (ename.Equals("exhibition"))
                {
                    XYECOM.Business.ShowType showtype = new XYECOM.Business.ShowType(); ;
                    j = xy.InfoNum("XY_showinfo", "typeid", id);
                    if (j <= 0)
                    {
                        i = showtype.Delete(id);
                    }
                }
            }
            else
            {
                if (ename.Equals("offer") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("offer"))
                {
                    XYECOM.Business.ProductType pt = new XYECOM.Business.ProductType();
                    j = xy.InfoNum("i_supply", "PT_ID", id);
                    if (j <= 0)
                    {
                        i = pt.Delete(id);
                    }
                }
                if (ename.Equals("investment") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("investment"))
                {
                    XYECOM.Business.InviteBusinessType it = new XYECOM.Business.InviteBusinessType();
                    j = xy.InfoNum("i_invitebusinessmaninfo", "IT_ID", id);
                    if (j <= 0)
                    {
                        i = it.Delete(id);
                    }
                }
                if (ename.Equals("service") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("service"))
                {
                    XYECOM.Business.ServiceType st = new XYECOM.Business.ServiceType(); ;
                    j = xy.InfoNum("i_serviceinfo", "ST_ID", id);
                    if (j <= 0)
                    {
                        i = st.Delete(id);
                    }
                }
            }
        }
        if (j > 0)
        {
            backURL = "Typelist.aspx?ename=" + ename + "&del='1'&orderid=" + XYECOM.Core.XYRequest.GetQueryString("ParentID");
            Alert("�÷����º�����Ϣ��", backURL);
        }
        if (i > 0)
        {
            isfirstid = id;
            Response.Redirect("Typelist.aspx?ename=" + ename + "&del='1'&orderid=" + XYECOM.Core.XYRequest.GetQueryString("ParentID"));
        }
    }
コード例 #4
0
ファイル: GetTreeType.aspx.cs プロジェクト: xyecom/AMS
    void CreateSuogateTypeInnerHTML(long IT_ID)
    {
        try
        {
            string str = "";
            string strlist = "";
            XYECOM.Business.InviteBusinessType it = new XYECOM.Business.InviteBusinessType();
            if (IT_ID == 0)
            {
                str += "请选择招商代理类别";
                strlist += "<li onclick=\"selectsuogateype(0,this);\">请选择招商代理类别</li>";
            }
            else
            {
                DataTable dtx = it.GetDataTable(" where IT_ID=" + IT_ID.ToString(), "");
                str += dtx.Rows[0]["IT_Name"].ToString();
                strlist += "<a href=\"#\" onclick=\"selectsuogateype(" + dtx.Rows[0]["IT_ID"].ToString() + ",this);\">" + dtx.Rows[0]["IT_Name"].ToString() + "</a>";
            }
            str += "$";
            DataTable dt = it.GetDataTable(" where IT_ParentID="+IT_ID, "");
            DataTable dt1 = it.GetDataTable(" where 1=1 ", "");
            if (dt.Rows.Count > 0)
            {
                strlist += " <ul class=\"subset\">";
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    str += "    <a href=\"#\" title=\"点击选择此项\" onclick=\"selectsuogateypeinfo(" + dt.Rows[i]["IT_ID"].ToString() + ",'" + dt.Rows[i]["IT_Name"].ToString() + "');\">" + dt.Rows[i]["IT_Name"].ToString() + "</a>";
                    strlist += "<li class=\"";
                    dt1.DefaultView.RowFilter = "IT_ParentID=" + dt.Rows[i]["IT_ID"].ToString();
                    DataView dv1 = dt1.DefaultView;
                    if (dv1.Count > 0)
                        strlist += "shrink\" ><a href=\"#\" onclick=\"selectsuogateype(" + dt.Rows[i]["IT_ID"].ToString() + ",this);\">" + dt.Rows[i]["IT_Name"].ToString() + "</a></li>";
                    else
                        strlist += "sublast\" >" + dt.Rows[i]["IT_Name"].ToString() + "</li>";

                }
                strlist += "</ul>";

            }
            else
            {
                str += " ";
            }

            str += "$";

            str += strlist;
            System.Web.HttpContext.Current.Response.Write(str);
        }
        catch (Exception ex)
        {
            XYECOM.Core .ErrMessage.WriteErrFile(ex);
        }
    }