89 lines
3.0 KiB
C#
89 lines
3.0 KiB
C#
using Newtonsoft.Json;
|
||
using Newtonsoft.Json.Linq;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.IO;
|
||
using System.Linq;
|
||
using System.Text;
|
||
using System.Web;
|
||
using System.Web.UI;
|
||
using System.Web.UI.WebControls;
|
||
using Telerik.Web.UI;
|
||
|
||
namespace VRS.Management.ZHC
|
||
{
|
||
public partial class Task_Proc_Flow : BasePage
|
||
{
|
||
|
||
DataService.BLL.admin_log log = new DataService.BLL.admin_log();
|
||
DataService.BLL.zhc_task bll_zhc_task = new DataService.BLL.zhc_task();
|
||
DataService.BLL.zhc_task_proc bll_zhc_task_proc = new DataService.BLL.zhc_task_proc();
|
||
protected override void Page_Load(object sender, EventArgs e)
|
||
{
|
||
if (!IsPostBack)
|
||
{
|
||
DataLoad();
|
||
}
|
||
}
|
||
protected void DataLoad()
|
||
{
|
||
string Id = Request.Params["Id"];
|
||
var query = new StringBuilder(" 1 = 1 ");
|
||
if (!string.IsNullOrWhiteSpace(Id.Trim()))
|
||
{
|
||
var task = bll_zhc_task.GetModel(Id.Trim());
|
||
if (null == task)
|
||
{
|
||
RadAjaxManager1.ResponseScripts.Add("alert('任务为空,不能操作!');CloseAndRebind();");
|
||
return;
|
||
}
|
||
|
||
var list = bll_zhc_task_proc.GetListOrderbyPosition(" taskId='" + task.taskId + "'");
|
||
RadListBoxDestination.DataSource = list;
|
||
RadListBoxDestination.DataValueField = "proc_id";
|
||
RadListBoxDestination.DataTextField = "name";
|
||
RadListBoxDestination.DataSortField = "position";
|
||
|
||
RadListBoxDestination.DataBind();
|
||
div_title.InnerHtml= task.taskName;
|
||
}
|
||
else
|
||
{
|
||
OnError(null);
|
||
}
|
||
}
|
||
|
||
protected void btnSure_Click(object sender, EventArgs e)
|
||
{
|
||
string Id = Request.Params["Id"];
|
||
var items = RadListBoxDestination.Items;
|
||
|
||
var list_text = new List<string>();
|
||
var list_value = new List<string>();
|
||
foreach (var item in items)
|
||
{
|
||
var obj = item as Telerik.Web.UI.ControlItem;
|
||
list_text.Add(obj.Text);
|
||
list_value.Add(obj.Value);
|
||
}
|
||
var task = bll_zhc_task.GetModel(Id.Trim());
|
||
var flag = bll_zhc_task_proc.update_position(list_value);
|
||
if (flag)
|
||
{
|
||
log.write_log("保存流程成功。" + "任务名称:" + task .taskName+ ",taskId:" + task.taskId);
|
||
RadAjaxManager1.ResponseScripts.Add("alert('保存成功!');CloseAndRebind();");
|
||
}
|
||
else
|
||
{
|
||
RadAjaxManager1.ResponseScripts.Add("alert('保存失败!');");
|
||
}
|
||
|
||
}
|
||
|
||
|
||
protected void RadListBoxDestination_Reordered(object sender, RadListBoxEventArgs e)
|
||
{
|
||
RadListBoxDestination.DataBind();
|
||
}
|
||
}
|
||
} |