コード例 #1
0
ファイル: tasks.aspx.cs プロジェクト: jaytem/minGit
    private void Process_DeleteTask()
    {
        ValidateCanDeleteTask();
        string taskid = Request.QueryString["tid"];
        string actionTy = Request.Form["ty"];
        objTask = AppUI.EkTaskRef;
        if ((actionTy == "deleted"))
        {
            ret = objTask.DeleteTasks(taskid, 9);
        }
        else
        {
            ret = objTask.DeleteTasks(taskid, 0);
        }
        if (!string.IsNullOrEmpty(Request.QueryString["forumid"]))
        {
            long forumId = EkFunctions.ReadDbLong(Request.QueryString["forumId"]);
            if (!string.IsNullOrEmpty(Request.QueryString["contentid"]))
            {
                long topicId = EkFunctions.ReadDbLong(Request.QueryString["contentid"]);
                callBackPage = "content.aspx?id=" + forumId + "&action=ViewContentByCategory&LangType=" + AppUI.ContentLanguage + "&ContType=" + Ektron.Cms.Common.EkConstants.CMSContentType_BlogComments + "&contentid=" + Request.QueryString["contentid"];
                ObjectFactory.GetForum().UpdateStatisticsForTopic(topicId);
            }
        }
        else if (!string.IsNullOrEmpty(Request.QueryString["blogid"]))
        {
            if (!string.IsNullOrEmpty(Request.QueryString["contentid"]))
            {
                callBackPage = "content.aspx?id=" + Request.QueryString["blogid"] + "&action=ViewContentByCategory&LangType=" + AppUI.ContentLanguage + "&ContType=" + Ektron.Cms.Common.EkConstants.CMSContentType_BlogComments + "&contentid=" + Request.QueryString["contentid"];
            }
            else
            {
                callBackPage = "content.aspx?id=" + Request.QueryString["blogid"] + "&action=ViewContentByCategory&LangType=" + AppUI.ContentLanguage + "&ContType=" + Ektron.Cms.Common.EkConstants.CMSContentType_BlogComments;
            }
        }
        else if (!string.IsNullOrEmpty(Request.QueryString["fromViewContent"]))
        {
            if (!string.IsNullOrEmpty(Request.QueryString["contentid"]))
            {
                callBackPage = "content.aspx?id=" + Request.QueryString["folderid"] + "&action=View&LangType=" + AppUI.ContentLanguage + "&contentid=" + Request.QueryString["contentid"];
            }
            else
            {
                 callBackPage = getCallBackupPage("tasks.aspx?action=ViewTasks&ty=" + Request.QueryString["ty"]);

            }
        }
        else
        {
            callBackPage = getCallBackupPage("tasks.aspx?action=ViewTasks&ty=" + Request.QueryString["ty"]);
        }
        if (Strings.Len(actErrorString) > 0)
        {
            Response.Redirect("reterror.aspx?info=" + actErrorString);
        }
        else
        {
            Response.Redirect(callBackPage);
        }
    }
コード例 #2
0
ファイル: tasks.aspx.cs プロジェクト: jaytem/minGit
    private void Process_UpdateStatePurge()
    {
        int State = Convert.ToInt32(Request.Form["state"]);
        string PurgeTasks = Request.Form["purge"];
        string actionType = Request.Form["actiontype"];
        string user = Request.Form["selectusergroup"];
        string taskids = Request.Form["taskids"];
        if ((!string.IsNullOrEmpty(taskids)))
        {
            taskids = Strings.Left(taskids, Strings.Len(taskids) - 1);
        }
        else
        {
            taskids = "";
        }
        objTask = AppUI.EkTaskRef;
        if ((PurgeTasks == "1"))
        {
            ret = objTask.DeleteTasks(taskids, 9);
            if ((!string.IsNullOrEmpty(actErrorString)))
            {
                Response.Redirect("reterror.aspx?info=" + (actErrorString));
            }

            Response.Redirect("tasks.aspx?action=ViewTasks&orderby=" + Request.Form["orderby"] + "&ty=" + Request.Form["actiontype"]);
        }
        else if ((actionType == "to" | actionType == "by"))
        {
            int userType = Convert.ToInt32(Strings.Right(user, 1));
            long iuser = Convert.ToInt64(Strings.Left(user, Strings.Len(user) - 2));
            ret = objTask.SetUserForTasks(taskids, userType, iuser, 0);
            if ((!string.IsNullOrEmpty(actErrorString)))
            {
                Response.Redirect("reterror.aspx?info=" + actErrorString);
            }

            Response.Redirect("tasks.aspx?action=ViewTasks&orderby=" + Request.Form["orderby"] + "&ty=" + Request.Form["actiontype"]);
        }
        else if ((actionType == "touser"))
        {
            string userType = Strings.Right(user, 1);
            user = Strings.Left(user, Strings.Len(user) - 2);
            Response.Redirect("tasks.aspx?action=ViewTasks&orderby=" + Request.Form["orderby"] + "&ty=" + Request.Form["actiontype"] + "&user="******"&usertype=" + userType);
        }
        else
        {
            ret = objTask.SetStateForTasks(taskids, State);
            if ((!string.IsNullOrEmpty(actErrorString)))
            {
                Response.Redirect("reterror.aspx?info=" + actErrorString);
            }

            Response.Redirect("tasks.aspx?action=ViewTasks&orderby=" + Request.Form["orderby"] + "&ty=" + Request.Form["actiontype"]);
        }
    }
コード例 #3
0
ファイル: tasks.aspx.cs プロジェクト: jaytem/minGit
    private void Process_DeleteAllTasks()
    {
        ValidateCanDeleteTask();
        string taskids = string.Empty;
        string actionTy = Request.Form["ty"];
        string[] arrArray = Request.Form["taskids"].Split(',');
        for (int i = 0; i < arrArray.Length; i++)
        {
            if (Request.Form["id_" + arrArray[i]] == "on")
            {
                taskids = taskids + arrArray[i] + ",";
            }
        }

        if ((!string.IsNullOrEmpty(taskids)))
        {
            taskids = Strings.Left(taskids, Strings.Len(taskids) - 1);
        }
        else
        {
            taskids = "";
        }
        objTask = AppUI.EkTaskRef;
        if ((actionTy == "deleted"))
        {
            ret = objTask.DeleteTasks(taskids, 9);
        }
        else
        {
            ret = objTask.DeleteTasks(taskids, 0);
        }

        if ((!string.IsNullOrEmpty(actErrorString)))
        {
            Response.Redirect("reterror.aspx?info=" + (actErrorString));
        }
        Response.Redirect("tasks.aspx?action=ViewTasks&orderby=" + Request.Form["orderby"] + "&ty=" + Request.Form["ty"]);
    }