Пример #1
0
 public ITPurchaseServer(WFContext wFContext, ExampleContext exampleContext, IMapper mapper, IWFInstanceServer iWFInstanceServer)
 {
     this.wFContext         = wFContext;
     this.exampleContext    = exampleContext;
     this.mapper            = mapper;
     this.iWFInstanceServer = iWFInstanceServer;
 }
Пример #2
0
 public WFInstanceServer(WFContext wFContext, IWFPool iWFPool, IMapper mapper, IWFTemplateServer templateServer, IConditionJudger judger)
 {
     this.wFContext      = wFContext;
     this.iWFPool        = iWFPool;
     this.mapper         = mapper;
     this.templateServer = templateServer;
     this.judger         = judger;
 }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack) {
         using (WFContext db = new WFContext()) {
             rptlist.DataSource = WFRepository.GetAll(db);
             rptlist.DataBind();
         }
     }
 }
Пример #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack) {
         string specialtyId = Request.QueryString[Helper.queryParam_specialty];
         using (WFContext db=new WFContext()) {
             rptlist.DataSource= ReportDetailRepository.GetAll(specialtyId , db);
             rptlist.DataBind();
         }
     }
 }
Пример #5
0
 void BindReport(HttpContext context)
 {
     string rptId = context.Request["rpt"];
     string wfId = context.Request["wf"];
     try {
         using (WFContext db=new WFContext()) {
             ReportDetail obj= db.ReportDetails.Find(rptId);
             if (null !=obj) {
                 obj.WorkflowId = wfId;
                 ReportDetailRepository.Update(obj , db);
             }
         }
     } catch (Exception ex) {
         context.Response.Write(ex.Message);
     }
 }
Пример #6
0
 //audit
 void Audit(HttpContext context)
 {
     if (!context.User.Identity.IsAuthenticated) {
         context.Response.Write("无操作权限");
         return;
     }
     string signerId = context.User.Identity.Name;
     string doId = context.Request["todoId"];
     string tag = context.Request["tag"];
     string result = context.Request["result"];
     try {
         using (WFContext db=new WFContext()) {
             Signer s = new Signer {
                 Id = signerId ,
                 signResult = (SignResult)int.Parse(result) ,
                 SignTime = DateTime.Now ,
                 Tag = context.Server.UrlDecode(tag)
             };
             RepositoryFactory<WFInstanceRepository>.Get().Sign(doId , s , db);
         }
     } catch (Exception ex) {
         context.Response.Write(ex.Message);
     }
 }
Пример #7
0
 public WFTemplateServer(WFContext wFContext, IWFPool iWFPool, IMapper mapper)
 {
     this.wFContext = wFContext;
     this.iWFPool   = iWFPool;
     this.mapper    = mapper;
 }
Пример #8
0
 public TestRepo(WFContext context)
 {
     _context = context;
 }
Пример #9
0
 public WFStatusRepo(WFContext wFContext)
 {
     _wFContext = wFContext;
 }
Пример #10
0
 /// <summary>
 /// Class to manipulate by creation and destruction of Workflow Charts as container for Tasks and items.
 /// Chart defined by ChartName. ChartDescripption can be omitted. ChartId passed to POST, PUT, DELETE requests is omitted.
 /// </summary>
 public WFChartsController(WFContext context, IWFChartRepository repository)
 {
     _context    = context;
     _repository = repository;
 }
Пример #11
0
 void CreateWorkflow(HttpContext context)
 {
     string name = context.Request["name"];
     string id = context.Request["id"];
     string wf = context.Request["wf"];
     try {
         if (string.IsNullOrWhiteSpace(id)) {
             id = System.Guid.NewGuid().ToString();
         }
         XElement doc = XElement.Parse(wf);
         var obj = from p in doc.Elements("a")
                   select new Active {
                       Id =  System.Guid.NewGuid().ToString(),
                       IntervalHours = int.Parse(p.Attribute("hours").Value),
                       Signers=BuildSigners(p.Elements())
                   };
         Workflow workflow = new Workflow {
             Id=id,
             Name=context.Server.UrlDecode(name),
             Actives=obj.ToList()
         };
         using (WFContext db = new WFContext()) {
             WFRepository.Save(workflow , db);
             AppLog.Write("创建流程:"+workflow.Name , AppLog.LogMessageType.Info , "id="+workflow.Id , this.GetType());
         }
     } catch (Exception ex) {
         AppLog.Write("创建流程 出错", AppLog.LogMessageType.Error,"",ex,this.GetType());
         context.Response.Write(ex.Message);
     }
 }
Пример #12
0
 public WFTaskRepo(WFContext wFContext)
 {
     _wFContext = wFContext;
 }
Пример #13
0
 public WFRepo(WFContext wFContext)
 {
     _wFContext = wFContext;
 }
Пример #14
0
 public WFStepRepo(WFContext wFContext)
 {
     _wFContext = wFContext;
 }