Example #1
0
        /// <summary>
        /// ת������
        /// </summary>
        /// <param name="modulename">ģ������</param>
        /// <param name="oldid">Ҫ����Ϣ�ķ���ID</param>
        /// <param name="newid">����Ϊ�·����ID</param>
        private void MoveData(String modulename, String oldid, String newid)
        {
            //����
            String tablename = "";
            //���µ��ֶ�����
            String flagname = "";
            //��ϢID����
            String infoname = "";
            int result = 0;
            XYECOM.Business.XYClass xy = new XYECOM.Business.XYClass();

            if (ename.Equals("job") || ename.Equals("exhibition"))
            {
                if (ename.Equals("job"))
                {
                    tablename = "i_engageinfo";
                    flagname = "P_ID";
                    infoname = "EI_ID";
                    result = xy.UpdatesByID(tablename, flagname, infoname, oldid, newid);
                }
                if (ename.Equals("exhibition"))
                {
                    tablename = "XY_showinfo";
                    flagname = "typeid";
                    infoname = "id";
                    result = xy.UpdatesByID(tablename, flagname, infoname, oldid, newid);
                }
            }
            else
            {
                if (ename.Equals("offer") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("offer"))
                {
                    tablename = "i_supply";
                    flagname = "PT_ID";
                    infoname = "SD_ID";
                    result = xy.UpdatesByID(tablename, flagname, infoname, oldid, newid);
                }

                if (ename.Equals("investment") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("investment"))
                {
                    tablename = "i_invitebusinessmaninfo";
                    flagname = "IT_ID";
                    infoname = "IBI_ID";
                    result = xy.UpdatesByID(tablename, flagname, infoname, oldid, newid);
                }
                if (ename.Equals("service") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("service"))
                {
                    tablename = "i_serviceinfo";
                    flagname = "ST_ID";
                    infoname = "S_ID";
                    result = xy.UpdatesByID(tablename, flagname, infoname, oldid, newid);
                }
            }
            if (result > 0)
            {
                Alert("����ת�Ƴɹ���", "Typelist.aspx?ename=" + ename + "&orderid=" + XYECOM.Core.XYRequest.GetQueryInt64("PT_ParentID"));
            }
            else
            {
                this.lblMessage.Text = "ת������ʧ�ܻ�ָ�������������ݿ�ת�ƣ�";
            }
        }
Example #2
0
        /// <summary>
        /// ��ת�����͵������б�
        /// </summary>
        /// <param name="parentID"></param>
        /// <param name="splitStr"></param>
        /// <returns></returns>
        protected List<ListItem> _BindData(string typename, long parentID, string splitStr)
        {
            XYECOM.Business.XYClass BLL = new XYClass();

            List<ListItem> listItems = new List<ListItem>();
            List<XYECOM.Model.XYClassInfo> infos = XYECOM.Business.XYClass.GetSubItems(typename, parentID);

            foreach (XYECOM.Model.XYClassInfo info in infos)
            {
                listItems.Add(new ListItem(splitStr + info.ClassName, info.ClassId.ToString()));

                if (XYECOM.Business.XYClass.IsHasSubClass(typename, info.ClassId))
                    listItems.AddRange(_BindData(typename, info.ClassId, "��" + splitStr));
            }

            return listItems;
        }
Example #3
0
        /// <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;
            }
        }
Example #4
0
    /// <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"));
        }
    }
Example #5
0
    private void Del(String id)
    {
        int i = 0;
        int j = 0;

        XYECOM.Business.NewsTitles BLL = new NewsTitles();
        XYECOM.Business.XYClass clsBLL = new XYECOM.Business.XYClass();

        string name ="";
        string domain = "";

        XYECOM.Model.NewsTitlesInfo tInfo = BLL.GetItem(XYECOM.Core.MyConvert.GetInt32(id));

        if(tInfo != null)
        {
            name = tInfo.TempletFolderAddress;
            domain = tInfo.DomainName;
        }

        j = clsBLL.InfoNum("n_news","NT_ID",id);

        if(j <= 0)
        {
            i = BLL.Delete(id);
        }
        else
        {
            Alert("该栏目下含有信息!", "TitleList.aspx");
        }

        if( i > 0)
        {
            isfirstid = id;
            Response.Redirect("TitleList.aspx");
        }
    }
Example #6
0
    private void Del(String id)
    {
        int i = 0;
        int j = 0;
        XYECOM.Business.UserType ut = new UserType();
        XYECOM.Business.XYClass xy = new XYECOM.Business.XYClass();
        j = xy.InfoNum("u_userinfo", "UT_ID", id);
        String backURL = "UserTypelist.aspx";
        if(j <= 0){
            i = ut.Delete(id);
        }

        if (j > 0)
        {
            Alert("该分类下含有信息!", backURL);
        }
        if (i > 0)
        {
            isfirstid = id;
            Response.Redirect("UserTypelist.aspx");
        }
    }