当前位置: 首页>>代码示例>>C#>>正文


C# Post.Delete方法代码示例

本文整理汇总了C#中Post.Delete方法的典型用法代码示例。如果您正苦于以下问题:C# Post.Delete方法的具体用法?C# Post.Delete怎么用?C# Post.Delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Post的用法示例。


在下文中一共展示了Post.Delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DelType

        /// <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;
            }
        }
开发者ID:xyecom,项目名称:AMS,代码行数:77,代码来源:XYAjax.ashx.cs

示例2: Del

    /// <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"));
        }
    }
开发者ID:xyecom,项目名称:AMS,代码行数:80,代码来源:TypeList.aspx.cs


注:本文中的Post.Delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。