public ITPurchaseServer(WFContext wFContext, ExampleContext exampleContext, IMapper mapper, IWFInstanceServer iWFInstanceServer) { this.wFContext = wFContext; this.exampleContext = exampleContext; this.mapper = mapper; this.iWFInstanceServer = iWFInstanceServer; }
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; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { using (WFContext db = new WFContext()) { rptlist.DataSource = WFRepository.GetAll(db); rptlist.DataBind(); } } }
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(); } } }
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); } }
//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); } }
public WFTemplateServer(WFContext wFContext, IWFPool iWFPool, IMapper mapper) { this.wFContext = wFContext; this.iWFPool = iWFPool; this.mapper = mapper; }
public TestRepo(WFContext context) { _context = context; }
public WFStatusRepo(WFContext wFContext) { _wFContext = wFContext; }
/// <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; }
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); } }
public WFTaskRepo(WFContext wFContext) { _wFContext = wFContext; }
public WFRepo(WFContext wFContext) { _wFContext = wFContext; }
public WFStepRepo(WFContext wFContext) { _wFContext = wFContext; }