Ejemplo n.º 1
0
 public PurchasingWorkFlowProcessService(
     IUnitOfWork unitOfWork, WorkFlowDataService workFlowDataService)
     : base(unitOfWork, workFlowDataService)
 {
     _unitOfWork          = unitOfWork;
     _workFlowDataService = workFlowDataService;
 }
Ejemplo n.º 2
0
 public HierarchExplorerService(
     IUnitOfWork unitOfWork,
     WorkFlowDataService workFlowDataService) :
     base(unitOfWork, workFlowDataService)
 {
     this.unitOfWork          = unitOfWork;
     this.workFlowDataService = workFlowDataService;
 }
Ejemplo n.º 3
0
 public PurchReqWorkflowProcessService(
     IUnitOfWork unitOfWork,
     WorkFlowDataService workFlowDataService
     ) : base(unitOfWork, workFlowDataService)
 {
     this.workFlowDataService = workFlowDataService;
     this.unitOfWork          = unitOfWork;
 }
Ejemplo n.º 4
0
        public static string Caller(
            IUnitOfWork unitOfWork,
            string methodCallString,
            WorkFlowDataService workFlowDataService)
        {
            string serviceAsmPath = ConfigurationManager.AppSettings["ServiceAsmPath"].Trim();
            string serviceBaseDir = ConfigurationManager.AppSettings["ServiceBaseDir"].Trim();


            var    splitServiceMethod = methodCallString.Split('.');
            string methodPart         = splitServiceMethod[splitServiceMethod.Length - 1];
            string methodName         = methodPart.Substring(0, methodPart.LastIndexOf("("));
            string serviceName        = methodCallString.Replace("." + methodPart, "");



            object[] parameters = methodPart.Substring(
                methodPart.LastIndexOf("(") + 1,
                (methodPart.LastIndexOf(")") - methodPart.LastIndexOf("(") - 1))
                                  .Split(',')
                                  .Select(p => p.Trim())
                                  .ToArray <object>();

            var asmClass = string.Format("{0}{1}.{2}", serviceAsmPath, (string.IsNullOrEmpty(serviceBaseDir) ? "" : "." + serviceBaseDir), serviceName);

            Assembly asm  = Assembly.Load(serviceAsmPath);
            Type     type = asm.GetType(asmClass);

            Object     obj        = Activator.CreateInstance(type, unitOfWork, workFlowDataService);
            MethodInfo methodInfo = type.GetMethod(methodName);

            string result;

            if (parameters.Count() == 1 && string.IsNullOrWhiteSpace(parameters[0].ToString()))
            {
                result = methodInfo.Invoke(obj, null).ToString();
            }
            else
            {
                result = methodInfo.Invoke(obj, parameters).ToString();
            }
            return(result);
        }
Ejemplo n.º 5
0
        //public void FormSave(WorkFlowFormViewModel formData);

        public WorkFlowProcessService(IUnitOfWork unitOfWork, WorkFlowDataService workFlowDataService)
        {
            _unitOfWork          = unitOfWork;
            _workFlowDataService = workFlowDataService;
        }