using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Concurrent;
using System.IO;
using Newtonsoft.Json;
using BP.En;
using BP.Port;
using BP.DA;
using BP.Sys;
using BP.WF;
using BP.WF.Template;
namespace CCFlow
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
return;
//BP.WF.Dev2Interface.Port_Login("admin");
//Int64 workid = BP.WF.Dev2Interface.Node_CreateBlankWork("001");
//var dirs = BP.WF.Dev2Interface.Node_GetNextStepNodesByNodeID(101);
//Direction dir = dirs[0] as Direction;
//var dt = BP.WF.Dev2Interface.Node_GetNextStepEmpsByNodeID(dir.ToNode,workid);
//string js3on = BP.Tools.Json.ToJson(dt);
//this.Response.Write(js3on);
// BP.WF.Dev2Interface.Node_GetNextStepNode
//BP.WF.Dev2Interface.Port_Login("admin");
////创建一个项目编号, 根据模板编号.
//string prjNo = BP.TA.TaskAPI.Prj_CreateNo("009");
////发起项目.
//BP.TA.TaskAPI.Prj_Start(prjNo);
//BP.TA.TaskAPI.Prj_Start(prjNo);
//WFState.Blank
// BP.WF.SendReturnObjs objs = BP.WF.Dev2Interface.Node_SendWork("001", 10022); //发送成功后返回一个对象.
// var toNodeID = objs.VarToNodeID; //到达的节点IDs, 比如: 106
// var toEmpIDs = objs.VarAcceptersID; //到达的人员ID, 比如; zhangsan,lisi
// var aletMsg = objs.ToMsgOfHtml(); //提示信息. 当前工作已完成, 下一步发送给xxx, 发送到xxxx.
//string valJson = BP.Tools.Json.ToJson(objs); // 把这个对象组成一个Json.
return;
BP.TA.Track tk = new BP.TA.Track();
tk.CheckPhysicsTable();
BP.DA.DBAccess.RunSQL("DELETE FROM TA_Project ");
BP.DA.DBAccess.RunSQL("DELETE FROM TA_Task ");
BP.DA.DBAccess.RunSQL("DELETE FROM TA_WorkerList ");
BP.DA.DBAccess.RunSQL("DELETE FROM TA_Track ");
//for (int i = 0; i < 10; i++)
//{
// //创建一个项目编号, 根据模板编号.
// string prjNo = BP.TA.TaskAPI.Prj_CreateNo("009");
// //发起项目.
// BP.TA.TaskAPI.Prj_Start(prjNo);
//}
return;
// en.
//BP.WF.Dev2Interface.Port_Login("admin");
//BP.WF.Flows ens = new Flows();
//ens.RetrieveAll();
//ens.GetNewEntity.CheckPhysicsTable();
//foreach (Flow fl in ens)
//{
// GERpt rpt = fl.HisGERpt;
// rpt.CheckPhysicsTable();
//}
// Flow
// WorkFlow
//登录.
//DateTime dt = System.DateTime.Now;
//BP.WF.Dev2Interface.Port_Login("admin");
//for (int i = 0; i < 100; i++)
//{
// //创建workid.
// Int64 workid = BP.WF.Dev2Interface.Node_CreateBlankWork("016");
// //执行发送.
// BP.WF.Dev2Interface.Node_SendWork("016", workid, 1603,"admin");
// //执行结束.
// BP.WF.Dev2Interface.Flow_DoFlowOver(workid, "ss", 0);
//}
//DateTime dt1 = System.DateTime.Now;
//TimeSpan ts = dt1 - dt;
//this.Response.Write(" = "+ts.TotalSeconds+": xxxxxxxxxxxxxxxxxxxx");
return;
////1. 循环所有的业务数据.
//DataTable dt = DBAccess.RunSQLReturnTable("SELECT * FROM XXXX");
////2. 遍历所有的数据.
//foreach (DataRow item in dt.Rows)
//{
// //2.1 获取业务主键,该业务主键.
// string buessPK = "111";
// //2.2 检查是否已经发起,该流程.
// if (1 == 1)
// continue; //如果有该笔数据,conctinue.
// //2.3 创建一个workid
// Int64 workid = BP.WF.Dev2Interface.Node_CreateBlankWork("001", BP.Web.WebUser.No);
// //2.4 更新GenerWorkFlow.
// GenerWorkFlow gwf = new GenerWorkFlow(workid);
// gwf.WFState = WFState.Complete;
// gwf.Title = "设置标题.";
// gwf.Starter = "发起人";
// gwf.StarterName = "发起人name";
// gwf.Update();
// //2.5 写拉NDxxxRpt 流程业务表里.
// //2.6 获得自己的流程日志.
// DataTable dtLog = DBAccess.RunSQLReturnTable("SELECT ");
// //2.7 写入日志.
// foreach (DataRow mydr in dtLog.Rows)
// {
// }
//}
//// BP.WF.DeliveryWay.BySpecNodeEmp
//return;
//BP.WF.Dev2Interface.Port_Login("admin");
////创建workid.
//Int64 workID = BP.WF.Dev2Interface.Node_CreateBlankWork("013");
////修改主表数据.
//GEEntity frm = new GEEntity("Frm_YanShouDAN");
//frm.OID = workID;
//frm.RetrieveFromDBSources();
//frm.SetValByKey("XiangMuBianHao", "xxxxxxxxxxxxxxx");
//frm.SetValByKey("SQR", "周朋");
//frm.SetValByKey("Tel", "xxxx周朋");
//frm.Update();
////插入从表数据.
//GEDtl frmDtl = new GEDtl("Frm_YanShouDANDtl1");
//frmDtl.SetValByKey("RefPK", workID);
//frmDtl.SetValByKey("xxx", "xxx");
//frmDtl.OID = 0;
//frmDtl.Insert();
//frmDtl = new GEDtl("Frm_YanShouDANDtl1");
//frmDtl.SetValByKey("RefPK", workID);
//frmDtl.SetValByKey("xxx", "xxx");
//frmDtl.OID = 0;
//frmDtl.Insert();
////执行发送.
//SendReturnObjs obj= BP.WF.Dev2Interface.Node_SendWork("013", workID, 1305, "lisi");
//SendReturnObjs obj = BP.WF.Dev2Interface.Node_SendWork("013", workID, 0, "lisi");
//SendReturnObjs obj = BP.WF.Dev2Interface.Node_SendWork("013", workID, 0, "");
//string smg= obj.ToMsgOfHtml();
return;
//string cfg = "@EdityType=1@EnName=BP.TXS.XXX";
//AtPara ap = new AtPara(cfg);
//string enName = ap.GetValStrByKey("EnName");
//int editType = ap.GetValIntByKey("EdityType");
//return;
//string msg = "";
//// string flowNo = "080";
//string starter = "ht1";
//BP.WF.Dev2Interface.Port_Login(starter);
//msg += "@用户:" + starter + "已经安全登录.";
//Int64 workID = BP.WF.Dev2Interface.Node_CreateBlankWork(flowNo);
//msg += "@创建的WorkID:" + workID + ".";
//////构造参数。
////Hashtable ht = new Hashtable();
////ht.Add("ZuoWuJingLi1", "xxx,xxx,ccc,xx");//作物经理.
////ht.Add("JiShuJingLi", "xxx,xxx,ccc,xx");//技术经理..
////发送到节点2, 本级:技术经理岗位, 如果没有就跳转到节点3区域经理节点.
//SendReturnObjs objs = BP.WF.Dev2Interface.Node_SendWork(flowNo, workID);
//msg += "@发送到了:" + objs.VarToNodeID + ", " + objs.VarToNodeName + ", " + objs.VarAcceptersID + ":" + objs.VarAcceptersName;
//msg += "发送消息:" + objs.ToMsgOfText();
//if (objs.VarToNodeID != 6102)
// msg += "@已经执行了跳转,跳转到[" + objs.VarToNodeID + " - " + objs.VarToNodeName + "]";
////岗位齐全模式. dbhttsy 东部区域B, 岗位不全.
////string msg = this.Case1("dbhttsy");
////msg = msg.Replace("@", "
@");
////this.Response.Write(msg);
return;
////岗位齐全模式, 测试通过.
//string msg = this.Case1("httsy");
//msg = msg.Replace("@", "
@");
//this.Response.Write(msg);
//return;
//F BP.WF.Dev2Interface.Flow_DoRebackWorkFlow
//组织参数.
//Hashtable ht = new Hashtable();
//ht.Add("PrjNo", "项目编号");
//ht.Add("PrjName", "项目名称");
//ht.Add("JinE", 500000.00); //项目金额, 根据项目金额大小自动转向.
////调用发送接口.
//BP.WF.Dev2Interface.Node_SendWork("001", 1002, ht, null);
// WFState.Complete
return;
//string userNo = "zhangsan";
//BP.WF.Dev2Interface.Port_Login(userNo); //让张三登录。
//// 生成当前登录的token.
//string token = BP.WF.Dev2Interface.Port_GenerToken("PC");
////使用token登录.
//BP.WF.Dev2Interface.Port_LoginByToken(token);
////退出当前登录.
//BP.WF.Dev2Interface.Port_SigOut();
//BP.WF.WFState
//BP.Web.WebUser.No
return;
BP.WF.Glo.UpdataCCFlowVer();
return;
if (BP.Difference.SystemConfig.CustomerNo.Equals("PM") == true)
{
}
//return;
//BP.Port.Emp emp = new Emp();
//emp.Name = "张三";
//emp.No = "009";
//emp.FK_Dept = "100";
//emp.Insert();
////BP.Demo.BanJi en = new BP.Demo.BanJi();
////en.Name = "1年级";
////en.BZR = "张三";
////en.Insert();
//return;
return;
BP.WF.Dev2Interface.Port_Login("admin");
BP.Sys.MapDtl md = new MapDtl("ND102Dtl1");
string json = md.ToJson();
return;
// BP.En.ClassFactory.GetEn
// BP.WF.DeliveryWay
//string name = "liuwei"; NewFLow
//if (name.Equals("liuwei") == true)
//{
// BP.WF.Dev2Interface.Port_Login("admin");
// string ur13l = "/WF/CCForm/ChapterFrm.htm?FrmID=Frm_ZhangJieBiaoDAN&OID=100";
// this.Response.Redirect(ur13l, true);
// return;
//}
//BP.WF.Dev2Interface.Port_Login("admin");
//BP.Port.Depts ens = new BP.Port.Depts();
//ens.RetrieveAll();
//foreach (BP.Port.Dept item in ens)
//{
// item.DoResetPathName();
// item.Update();
//}
//return;
}
public void JianYuStations()
{
return;
BP.Port.Emps ens = new Emps();
ens.RetrieveAll();
DBAccess.RunSQL("DELETE FROM Port_DeptEmp ");
DBAccess.RunSQL("DELETE FROM Port_DeptEmpStation ");
foreach (Emp item in ens)
{
BP.Port.DeptEmp de = new BP.Port.DeptEmp();
de.FK_Emp = item.No;
de.FK_Dept = item.No;
de.Insert();
BP.Port.DeptEmpStation des = new BP.Port.DeptEmpStation();
if (item.Name.Contains("分监区") == true)
{
des.FK_Dept = item.No;
des.FK_Emp = item.No;
des.FK_Station = "98";
des.Insert();
continue;
}
if (item.Name.Contains("监区") == true)
{
des.FK_Dept = item.No;
des.FK_Emp = item.No;
des.FK_Station = "97";
des.Insert();
continue;
}
if (item.Name.Contains("刑罚") == true)
{
des.FK_Dept = item.No;
des.FK_Emp = item.No;
des.FK_Station = "6";
des.Insert();
continue;
}
des.FK_Dept = item.No;
des.FK_Emp = item.No;
des.FK_Station = "19";
des.Insert();
}
}
///