예제 #1
0
파일: tasks.aspx.cs 프로젝트: jaytem/minGit
    private void Process_EditTask()
    {
        ValidateCanEditTask();
        objTask = AppUI.EkTaskRef;
        objTask.TaskTitle = Request.Form["task_title"];
        if (Request.Form["priority"] != "")
        {
            objTask.Priority = (EkEnumeration.TaskPriority)Convert.ToInt32(Request.Form["priority"]);
        }
        if (Request.Form["status"] != "")
        {
            objTask.Status = Convert.ToInt32(Request.Form["status"]);
        }
        objTask.StartDate = Request.Form["hdnstartdate"];
        objTask.DueDate = Request.Form["hdnduedate"];
        objTask.Description = ctlEditor.Content;
        objTask.TaskID = Convert.ToInt64(Request.Form["task_id"]);
        if (!string.IsNullOrEmpty(Request.Form["assigned_to_user_id"]))
        {
            objTask.AssignedToUserID = Convert.ToInt64(Request.Form["assigned_to_user_id"]);
        }
        if (!string.IsNullOrEmpty(Request.Form["assigned_to_usergroup_id"]))
        {
            objTask.AssignToUserGroupID = Convert.ToInt64(Request.Form["assigned_to_usergroup_id"]);
        }
        if (!string.IsNullOrEmpty(Request.Form["assigned_by_user_id"]))
        {
            objTask.AssignedByUserID = Request.Form["assigned_by_user_id"];
        }
        if (!string.IsNullOrEmpty(Request.Form["content_id"]))
        {
            objTask.ContentID = Convert.ToInt64(Request.Form["content_id"]);
        }
        else
        {
            objTask.ContentID = -1;
        }
        if (Request.Form["state"] != null)
        {
            objTask.State = Request.Form["state"];
        }

        languageID = Convert.ToInt32(Request.Form["current_language"]);
        objTask.ContentLanguage = languageID;
        if (EnableMultilingual == 1)
        {
            languageID = Convert.ToInt32(Request.Form["language"]);
        }
        else
        {
            languageID = ContentLanguage;
        }
        objTask.LanguageID = languageID;

        if ((Request.Form["task_type"] != "") && (System.Convert.ToInt64(Request.Form["task_type"]) > 0))
        {
            objTask.TaskTypeID = Convert.ToInt64(Request.Form["task_type"]);
        }
        else if ((Request.Form["task_type_"] != "") && (System.Convert.ToInt64(Request.Form["task_type_"]) > 0)) //for blogcomments
        {
            objTask.TaskTypeID = Convert.ToInt64(Request.Form["task_type_"]);
        }
        ret = objTask.UpdateTask();
        if (ret)
        {
            Response.Redirect("reterror.aspx?info=" + actErrorString);
        }
        else
        {
            callBackPage = BuildCallBackParms("&");
            if (!string.IsNullOrEmpty(Request.QueryString["close"]))
            {
                Response.Redirect("close.aspx");
            }
            else if (!string.IsNullOrEmpty(Request.Form["blogid"]))
            {
                if (!string.IsNullOrEmpty(Request.Form["content_id"]))
                {
                    callBackPage = "content.aspx?id=" + Request.Form["blogid"] + "&action=ViewContentByCategory&LangType=" + AppUI.ContentLanguage + "&ContType=" + Ektron.Cms.Common.EkConstants.CMSContentType_BlogComments + "&contentid=" + Request.Form["content_id"];
                }
                else
                {
                    callBackPage = "content.aspx?id=" + Request.Form["blogid"] + "&action=ViewContentByCategory&LangType=" + AppUI.ContentLanguage + "&ContType=" + Ektron.Cms.Common.EkConstants.CMSContentType_BlogComments;
                }
                Response.Redirect(callBackPage, false);
            }
            else if (Convert.ToInt64(Request.Form["assigned_by_user_id"]) != currentUserID)
            {
                Response.Redirect("tasks.aspx?action=ViewTasks&orderby=" + Request.Form["orderby"] + "&ty=to" + callBackPage);
            }
            else
            {
                Response.Redirect("tasks.aspx?action=ViewTask&tid=" + Request.Form["task_id"] + callBackPage);
            }
        }
    }
예제 #2
0
파일: tasks.aspx.cs 프로젝트: jaytem/minGit
 private void Process_ApproveTask()
 {
     objTask = AppUI.EkTaskRef;
     long taskid = Convert.ToInt64(Request.QueryString["tid"]);
     objTask = objTask.GetTaskByID(taskid);
     objTask.State = Convert.ToString(Ektron.Cms.Common.EkEnumeration.TaskState.Completed);
     ret = objTask.UpdateTask();
     if (Request.QueryString["close"] == "true")
     {
         callBackPage = "close.aspx";
     }
     else 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;
     }
     if ((ret))
     {
         Response.Redirect("reterror.aspx?info=" + actErrorString);
     }
     else
     {
         Response.Redirect(callBackPage);
     }
 }