Esempio n. 1
0
        protected void EBtnBatchDelete_Click(object sender, EventArgs e)
        {
            this.PermissionDetection();
            StringBuilder selectList = this.EgvContent.SelectList;

            if (selectList.Length == 0)
            {
                AdminPage.WriteErrMsg("<li>对不起,您还没选择要删除的项目!</li>", string.Concat(new object[] { "ContentArchivingManage.aspx?NodeID=", BasePage.RequestInt32("NodeID"), "&ListType=", this.HdnListType.Value }));
            }
            else if (ContentManage.UpdateStatus(selectList.ToString(), -3))
            {
                PermissionContent.Delete(selectList.ToString());
                EasyOne.Contents.ContentCharge.Delete(selectList.ToString());
                SiteCache.Remove("CK_Page_Category_" + this.m_NodeId.ToString());
                if (SiteConfig.SmsConfig.IsAutoSendStateMessage)
                {
                    AdminPage.WriteSuccessMsg("<li>删除成功!</li><br /> " + this.ChangeStateSendMessageToUser(-3), string.Concat(new object[] { "ContentArchivingManage.aspx?NodeID=", BasePage.RequestInt32("NodeID"), "&ListType=", this.HdnListType.Value }));
                }
                else
                {
                    AdminPage.WriteSuccessMsg("<li>删除成功!</li>", string.Concat(new object[] { "ContentArchivingManage.aspx?NodeID=", BasePage.RequestInt32("NodeID"), "&ListType=", this.HdnListType.Value }));
                }
            }
            else
            {
                AdminPage.WriteErrMsg("<li>删除项目失败!</li>", string.Concat(new object[] { "ContentArchivingManage.aspx?NodeID=", BasePage.RequestInt32("NodeID"), "&ListType=", this.HdnListType.Value }));
            }
        }
Esempio n. 2
0
        private int AddPermissionAndCharge(DataTable dataTable, bool enableCharge)
        {
            int generalId = GetGeneralId(dataTable);
            ContentPermissionInfo contentPermissionInfo = new ContentPermissionInfo();

            contentPermissionInfo.GeneralId      = generalId;
            contentPermissionInfo.PermissionType = DataConverter.CLng(this.RadlInfoPurview.SelectedValue);
            contentPermissionInfo.ArrGroupId     = this.EChklUserGroupList.SelectList();
            int num2 = DataConverter.CLng(this.TxtInfoPoint.Text);

            PermissionContent.Delete(generalId);
            if (PermissionContent.Add(contentPermissionInfo))
            {
                EasyOne.Contents.ContentCharge.Delete(generalId);
                if (enableCharge && (num2 > 0))
                {
                    ContentChargeInfo contentChargeInfo = new ContentChargeInfo();
                    contentChargeInfo.GeneralId     = generalId;
                    contentChargeInfo.InfoPoint     = num2;
                    contentChargeInfo.ChargeType    = this.ShowChargeType.ChargeType;
                    contentChargeInfo.PitchTime     = this.ShowChargeType.PitchTime;
                    contentChargeInfo.ReadTimes     = this.ShowChargeType.ReadTimes;
                    contentChargeInfo.DividePercent = DataConverter.CLng(this.TxtDividePercent.Text);
                    EasyOne.Contents.ContentCharge.Add(contentChargeInfo);
                }
            }
            return(num2);
        }
Esempio n. 3
0
        private void AddCharge(DataTable dataTable)
        {
            int      generalId     = DataConverter.CLng(dataTable.Select("FieldName = 'generalId'")[0]["FieldValue"].ToString());
            NodeInfo cacheNodeById = EasyOne.Contents.Nodes.GetCacheNodeById(DataConverter.CLng(dataTable.Select("FieldName = 'nodeId'")[0]["FieldValue"].ToString()));
            ContentPermissionInfo contentPermissionInfo = new ContentPermissionInfo();

            contentPermissionInfo.GeneralId      = generalId;
            contentPermissionInfo.PermissionType = 0;
            PermissionContent.Delete(generalId);
            if (PermissionContent.Add(contentPermissionInfo))
            {
                ContentCharge.Delete(generalId);
                if (cacheNodeById.Settings.DefaultItemPoint > 0)
                {
                    ContentChargeInfo contentChargeInfo = new ContentChargeInfo();
                    contentChargeInfo.GeneralId     = generalId;
                    contentChargeInfo.InfoPoint     = cacheNodeById.Settings.DefaultItemPoint;
                    contentChargeInfo.ChargeType    = cacheNodeById.Settings.DefaultItemChargeType;
                    contentChargeInfo.PitchTime     = cacheNodeById.Settings.DefaultItemPitchTime;
                    contentChargeInfo.ReadTimes     = cacheNodeById.Settings.DefaultItemReadTimes;
                    contentChargeInfo.DividePercent = cacheNodeById.Settings.DefaultItemDividePercent;
                    ContentCharge.Add(contentChargeInfo);
                }
            }
        }
 protected void EgvContentSignin_RowCommand(object sender, CommandEventArgs e)
 {
     if (e.CommandName == "DeleteContent")
     {
         int generalId = DataConverter.CLng(e.CommandArgument.ToString());
         if (ContentManage.UpdateStatus(generalId, -3))
         {
             PermissionContent.Delete(generalId);
             EasyOne.Contents.ContentCharge.Delete(generalId);
             AdminPage.WriteSuccessMsg("<li>删除成功!</li>", "ContentSignin.aspx?NodeID=" + BasePage.RequestInt32("NodeID"));
         }
         else
         {
             AdminPage.WriteErrMsg("<li>删除失败!</li>");
         }
     }
 }
Esempio n. 5
0
        protected void EBtnBatchDelete_Click(object sender, EventArgs e)
        {
            this.PermissionDetection(this.m_isManage);
            StringBuilder selectList = this.EgvContent.SelectList;

            if (selectList.Length == 0)
            {
                AdminPage.WriteErrMsg("<li>对不起,您还没选择要删除的项目!</li>", "ContentManage.aspx?NodeID=" + BasePage.RequestInt32("NodeID"));
            }
            else if (ContentManage.UpdateStatus(selectList.ToString(), -3))
            {
                PermissionContent.Delete(selectList.ToString());
                EasyOne.Contents.ContentCharge.Delete(selectList.ToString());
                SiteCache.Remove("CK_Page_Category_" + this.m_NodeId.ToString());
                AdminPage.WriteSuccessMsg("<li>删除成功!</li>", "ContentManage.aspx?NodeID=" + BasePage.RequestInt32("NodeID"));
            }
            else
            {
                AdminPage.WriteErrMsg("<li>删除项目失败!</li>", "ContentManage.aspx?NodeID=" + BasePage.RequestInt32("NodeID"));
            }
        }
Esempio n. 6
0
 protected void EgvContent_RowCommand(object sender, CommandEventArgs e)
 {
     if (e.CommandName == "DeleteContent")
     {
         int             generalId           = DataConverter.CLng(e.CommandArgument.ToString());
         CommonModelInfo commonModelInfoById = ContentManage.GetCommonModelInfoById(generalId);
         this.m_IsInput = this.CheckUserConentInputPurview(commonModelInfoById.NodeId);
         if (!this.m_IsInput)
         {
             DynamicPage.WriteUserErrMsg("<li>没有删除权限!</li>");
         }
         if (ContentManage.UpdateStatusByUserName(e.CommandArgument.ToString(), -3))
         {
             PermissionContent.Delete(generalId);
             ContentCharge.Delete(generalId);
             DynamicPage.WriteUserSuccessMsg("<li>删除成功!</li>", "ContentManage.aspx?NodeID=" + BasePage.RequestInt32("NodeID"));
         }
         else
         {
             DynamicPage.WriteUserErrMsg("<li>删除失败!</li>");
         }
     }
 }
Esempio n. 7
0
        protected void EgvContent_RowCommand(object sender, CommandEventArgs e)
        {
            int    generalId   = DataConverter.CLng(e.CommandArgument.ToString());
            string commandName = e.CommandName;

            if (commandName != null)
            {
                if (!(commandName == "CancelArchiving"))
                {
                    if (!(commandName == "DeleteContent"))
                    {
                        return;
                    }
                }
                else
                {
                    if (ContentManage.UpdateStatus(generalId, 0))
                    {
                        AdminPage.WriteSuccessMsg("<li>取消归档成功!</li>", string.Concat(new object[] { "ContentArchivingManage.aspx?NodeID=", BasePage.RequestInt32("NodeID"), "&Status=102&ListType=", this.HdnListType.Value }));
                        return;
                    }
                    AdminPage.WriteErrMsg("<li>取消归档失败!</li>", string.Concat(new object[] { "ContentArchivingManage.aspx?NodeID=", BasePage.RequestInt32("NodeID"), "&Status=102&ListType=", this.HdnListType.Value }));
                    return;
                }
                if (ContentManage.UpdateStatus(generalId, -3))
                {
                    PermissionContent.Delete(generalId);
                    EasyOne.Contents.ContentCharge.Delete(generalId);
                    SiteCache.Remove("CK_Page_Category_" + this.m_NodeId.ToString());
                    AdminPage.WriteSuccessMsg("<li>删除成功!</li>", string.Concat(new object[] { "ContentArchivingManage.aspx?NodeID=", BasePage.RequestInt32("NodeID"), "&Status=102&ListType=", this.HdnListType.Value }));
                }
                else
                {
                    AdminPage.WriteErrMsg("<li>删除失败!</li>", string.Concat(new object[] { "ContentArchivingManage.aspx?NodeID=", BasePage.RequestInt32("NodeID"), "&Status=102&ListType=", this.HdnListType.Value }));
                }
            }
        }