public IEnumerable <CustomParam> GetCPByInstance(string entity, string key, string attrentity, string cpSource, string cpTarget)
        {
            var resultParam = new TransmitterParam {
                Name = "result", Type = typeof(List <CustomParam>), IsOut = true
            };
            var entityParam = new TransmitterParam {
                Name = "entity", Type = typeof(string), Value = entity, IsOut = false
            };
            var keyParam = new TransmitterParam {
                Name = "key", Type = typeof(string), Value = key, IsOut = false
            };
            var attrentityParam = new TransmitterParam {
                Name = "attrentity", Type = typeof(string), Value = attrentity, IsOut = false
            };
            var cpSourceParam = new TransmitterParam {
                Name = "cpSource", Type = typeof(string), Value = cpSource, IsOut = false
            };
            var cpTargetParam = new TransmitterParam {
                Name = "cpTarget", Type = typeof(string), Value = cpTarget, IsOut = false
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(CustomParam).Name, "GetCPByInstance", new[] { resultParam, entityParam, keyParam, attrentityParam, cpSourceParam, cpTargetParam });

            ProcessTelegramm(telegram);
            return((List <CustomParam>)resultParam.Value);
        }
        public virtual void Update(XmlDocument xmlDoc)
        {
            var xmlDocParam = new TransmitterParam {
                Name = "xmlDoc", Type = typeof(XmlDocument), Value = xmlDoc
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "Update", new[] { xmlDocParam });

            ProcessTelegramm(telegram);
        }
        public void Insert(ref IEnumerable <T> entities)
        {
            var entityParam = new TransmitterParam {
                Name = "entities", Type = typeof(IEnumerable <T>), Value = entities, IsOut = true
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "Insert", new[] { entityParam });

            ProcessTelegramm(telegram);
        }
        public virtual void Delete(T entity)
        {
            var entityParam = new TransmitterParam {
                Name = "entity", Type = typeof(T), Value = entity
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "Delete", new[] { entityParam });

            ProcessTelegramm(telegram);
        }
        public virtual void Delete(IEnumerable <T> entities)
        {
            var entityParam = new TransmitterParam {
                Name = "entities", Type = typeof(IEnumerable <T>), Value = entities
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "Delete", new[] { entityParam });

            ProcessTelegramm(telegram);
        }
        public virtual void DeleteByKey(TKey key)
        {
            var keyParam = new TransmitterParam {
                Name = "key", Type = typeof(TKey), Value = key
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "DeleteByKey", new[] { keyParam });

            ProcessTelegramm(telegram);
        }
Exemple #7
0
        public void Run(ExecutionContext context)
        {
            var pContext = new TransmitterParam {
                Name = "context", Type = typeof(ExecutionContext), IsOut = false
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(BPProcess).Name, "Run", new[] { pContext });

            ProcessTelegramm(telegram);
        }
Exemple #8
0
        protected override void BeginChanges_Internal(IsolationLevel isolationLevel)
        {
            var uowParam = new TransmitterParam {
                Name = "IsolationLevel", Type = typeof(IsolationLevel), Value = isolationLevel
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(IUnitOfWork).Name, "BeginChanges", new[] { uowParam });

            ProcessTelegramm(telegram);
        }
        public void Update(IEnumerable <XmlDocument> xmlDocuments)
        {
            var xmlDocumentsParam = new TransmitterParam {
                Name = "xmlDocuments", Type = typeof(IEnumerable <XmlDocument>), Value = xmlDocuments
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "Update", new[] { xmlDocumentsParam });

            ProcessTelegramm(telegram);
        }
Exemple #10
0
        public void Activate(ref IWB entity)
        {
            var entityParam = new TransmitterParam {
                Name = "entity", Type = typeof(IWB), Value = entity, IsOut = true
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(IWB).Name, "Activate", new[] { entityParam });

            ProcessTelegramm(telegram);
        }
Exemple #11
0
        public virtual void Insert(ref T entity)
        {
            var param = new TransmitterParam {
                Name = "entity", Type = typeof(T), Value = entity, IsOut = true
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "Insert", new[] { param });

            ProcessTelegramm(telegram);
            entity = (T)param.Value;
        }
Exemple #12
0
        public virtual IEnumerable <User> GetAllFromActiveDirectory()
        {
            var resultParam = new TransmitterParam {
                Name = "result", Type = typeof(List <User>), IsOut = true
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(User).Name, "GetAllFromActiveDirectory", new[] { resultParam });

            ProcessTelegramm(telegram);
            return((List <User>)resultParam.Value);
        }
Exemple #13
0
        protected override void Dispose(bool disposing)
        {
            // сервису сообщаем о закрытии только долгих
            if (disposing && !Guid.Empty.Equals(GetId()))
            {
                var telegram = new RepoQueryTelegramWrapper(typeof(IUnitOfWork).Name, "Dispose", new TransmitterParam[0]);
                ProcessTelegramm(telegram);
            }

            base.Dispose(disposing);
        }
        public virtual void ClearCache()
        {
            ClearLocalCache();

            if (IsNeedSendClearCacheTelegram)
            {
                // отправляем телеграммку
                var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, ClearCacheActionName, new TransmitterParam[0]);
                ProcessTelegramm(telegram);
            }
        }
Exemple #15
0
        public void ChangeStateByKey(object entityKey, string operationName)
        {
            var entityKeyParam = new TransmitterParam {
                Name = "entityKey", Type = typeof(object), Value = entityKey
            };
            var operationNameParam = new TransmitterParam {
                Name = "operationName", Type = typeof(string), Value = operationName
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "ChangeStateByKey", new[] { entityKeyParam, operationNameParam });

            ProcessTelegramm(telegram);
        }
Exemple #16
0
        public virtual void SetXaml(TKey pKey, string xaml)
        {
            var pKeyParam = new TransmitterParam {
                Name = "pKey", Type = typeof(TKey), IsOut = false, Value = pKey
            };
            var xamlParam = new TransmitterParam {
                Name = "xaml", Type = typeof(string), IsOut = false, Value = xaml
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "SetXaml", new[] { pKeyParam, xamlParam });

            ProcessTelegramm(telegram);
        }
        public void SetFileData(decimal pKey, string data)
        {
            var pKeyParam = new TransmitterParam {
                Name = "pKey", Type = typeof(decimal), IsOut = false, Value = pKey
            };
            var dataParam = new TransmitterParam {
                Name = "data", Type = typeof(string), IsOut = false, Value = data
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(EntityFile).Name, "SetFileData", new[] { pKeyParam, dataParam });

            ProcessTelegramm(telegram);
        }
Exemple #18
0
        public void FillByGroup(decimal workId, decimal groupId)
        {
            var workIdParam = new TransmitterParam {
                Name = "workId", Type = typeof(decimal), Value = workId
            };
            var groupIdParam = new TransmitterParam {
                Name = "groupId", Type = typeof(decimal), Value = groupId
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(Work).Name, "FillByGroup", new[] { workIdParam, groupIdParam });

            ProcessTelegramm(telegram);
        }
Exemple #19
0
        public void ChangeStatus(string teCode, string operation)
        {
            var teCodeParam = new TransmitterParam {
                Name = "teCode", Type = typeof(string), Value = teCode, IsOut = false
            };
            var operationParam = new TransmitterParam {
                Name = "operation", Type = typeof(string), Value = operation, IsOut = false
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(TE).Name, "ChangeStatus", new[] { teCodeParam, operationParam });

            ProcessTelegramm(telegram);
        }
Exemple #20
0
        public virtual IEnumerable <Right> GetUserRights(string signature)
        {
            var resultParam = new TransmitterParam {
                Name = "result", Type = typeof(List <Right>), IsOut = true
            };
            var signatureParam = new TransmitterParam {
                Name = "signature", Type = typeof(string), IsOut = false, Value = signature
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(User).Name, "GetUserRights", new[] { resultParam, signatureParam });

            ProcessTelegramm(telegram);
            return((List <Right>)resultParam.Value);
        }
        public PrintStreamConfig GetDefaultPrinter(string tListParams)
        {
            var resultParam = new TransmitterParam {
                Name = "result", Type = typeof(PrintStreamConfig), IsOut = true
            };
            var tListParamsParam = new TransmitterParam {
                Name = "tListParams", Type = typeof(string), IsOut = false, Value = tListParams
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(Report2Entity).Name, "GetDefaultPrinter", new[] { resultParam, tListParamsParam });

            ProcessTelegramm(telegram);
            return((PrintStreamConfig)resultParam.Value);
        }
        public string GetFileData(decimal pKey)
        {
            var resultParam = new TransmitterParam {
                Name = "result", Type = typeof(string), IsOut = true
            };
            var pKeyParam = new TransmitterParam {
                Name = "pKey", Type = typeof(decimal), IsOut = false, Value = pKey
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(EntityFile).Name, "GetFileData", new[] { resultParam, pKeyParam });

            ProcessTelegramm(telegram);
            return(resultParam.Value == null ? null : resultParam.Value.ToString());
        }
Exemple #23
0
        public virtual string GetXaml(TKey pKey)
        {
            var resultParam = new TransmitterParam {
                Name = "result", Type = typeof(string), IsOut = true
            };
            var pKeyParam = new TransmitterParam {
                Name = "pKey", Type = typeof(TKey), IsOut = false, Value = pKey
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "GetXaml", new[] { resultParam, pKeyParam });

            ProcessTelegramm(telegram);
            return(resultParam.Value.ToString());
        }
//        public void RegEvent(ref EventHeader entity, EventParam paramLst)
//        {
//            var paramLstParam = new TransmitterParam { Name = "paramLst", Type = typeof(EventParam), Value = paramLst };
//            var entityParam = new TransmitterParam { Name = "entity", Type = typeof(EventHeader), Value = entity, IsOut = true };
//            var telegram = new RepoQueryTelegramWrapper(typeof(EventHeader).Name, "RegEvent", new[] { entityParam, paramLstParam });
//            ProcessTelegramm(telegram);
//            entity = (EventHeader)entityParam.Value;
//        }

        public void RegEvent(ref EventHeader entity, EventDetail eventDetail)
        {
            var paramLstParam = new TransmitterParam {
                Name = "eventDetail", Type = typeof(EventDetail), Value = eventDetail
            };
            var entityParam = new TransmitterParam {
                Name = "entity", Type = typeof(EventHeader), Value = entity, IsOut = true
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(EventHeader).Name, "RegEvent", new[] { entityParam, paramLstParam });

            ProcessTelegramm(telegram);
            entity = (EventHeader)entityParam.Value;
        }
        public void SetFileBody(string pEntity, string pKey, string pBody)
        {
            var entityParam = new TransmitterParam {
                Name = "pEntity", Type = typeof(string), IsOut = false, Value = pEntity
            };
            var keyParam = new TransmitterParam {
                Name = "pKey", Type = typeof(string), IsOut = false, Value = pKey
            };
            var bodyParam = new TransmitterParam {
                Name = "pBody", Type = typeof(string), IsOut = false, Value = pBody
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(EntityFile).Name, "SetFileBody", new[] { entityParam, keyParam, bodyParam });

            ProcessTelegramm(telegram);
        }
        public IEnumerable <HistoryWrapper <T> > GetHistory(string filter, string attrentity)
        {
            var resultParam = new TransmitterParam {
                Name = "result", Type = typeof(List <HistoryWrapper <T> >), IsOut = true
            };
            var filterParam = new TransmitterParam {
                Name = "filter", Type = typeof(string), Value = filter
            };
            var attrentityParam = new TransmitterParam {
                Name = "attrentity", Type = typeof(string), Value = attrentity
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, GetHistoryActionName, new[] { resultParam, filterParam, attrentityParam });

            ProcessTelegramm(telegram);
            return((List <HistoryWrapper <T> >)resultParam.Value);
        }
        public string GetFileBodyByEntity(string pEntity, string pKey)
        {
            var resultParam = new TransmitterParam {
                Name = "result", Type = typeof(string), IsOut = true
            };
            var entityParam = new TransmitterParam {
                Name = "pEntity", Type = typeof(string), IsOut = false, Value = pEntity
            };
            var keyParam = new TransmitterParam {
                Name = "pKey", Type = typeof(string), IsOut = false, Value = pKey
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(EntityFile).Name, "GetFileBodyByEntity", new[] { resultParam, entityParam, keyParam });

            ProcessTelegramm(telegram);
            return((string)resultParam.Value);
        }
Exemple #28
0
        public string Authenticate(string login, string credentials)
        {
            var resultParam = new TransmitterParam {
                Name = "result", Type = typeof(string), IsOut = true
            };
            var loginParam = new TransmitterParam {
                Name = "login", Type = typeof(string), IsOut = false, Value = login
            };
            var credentialsParam = new TransmitterParam {
                Name = "credentials", Type = typeof(string), IsOut = false, Value = credentials
            };
            var telegram = new RepoQueryTelegramWrapper(typeof(User).Name, "Authenticate", new[] { resultParam, loginParam, credentialsParam });

            ProcessTelegramm(telegram);
            return((string)resultParam.Value);
        }
Exemple #29
0
        public virtual XmlDocument GetXml(TKey key, string attrentity)
        {
            var resultParam = new TransmitterParam {
                Name = "result", Type = typeof(XmlDocument), IsOut = true
            };
            var keyParam = new TransmitterParam {
                Name = "key", Type = typeof(TKey), Value = key
            };
            var attrentityParam = new TransmitterParam {
                Name = "attrentity", Type = typeof(string), Value = attrentity
            };

            var telegram = new RepoQueryTelegramWrapper(typeof(T).Name, "GetXml", new[] { resultParam, keyParam, attrentityParam });

            ProcessTelegramm(telegram);
            return((XmlDocument)resultParam.Value);
        }
Exemple #30
0
        public void StartSession(string clientcode, string clienttypecode, string clientip, string clientmac,
                                 string clientSessionAppKey, ref decimal?clientSessionId,
                                 string clientSessionUserDomainName, string clientSessionClientVersion, string clientSessionServiceId, string clientOSVersion)
        {
            var clientCodeParam = new TransmitterParam {
                Name = "clientcode", Type = typeof(string), Value = clientcode, IsOut = false
            };
            var clienttypecodeParam = new TransmitterParam {
                Name = "clienttypecode", Type = typeof(string), Value = clienttypecode, IsOut = false
            };
            var clientipParam = new TransmitterParam {
                Name = "clientip", Type = typeof(string), Value = clientip, IsOut = false
            };
            var clientmacParam = new TransmitterParam {
                Name = "clientmac", Type = typeof(string), Value = clientmac, IsOut = false
            };
            var clientSessionAppKeyParam = new TransmitterParam {
                Name = "clientSessionAppKey", Type = typeof(string), Value = clientSessionAppKey, IsOut = false
            };
            var clientSessionIdParam = new TransmitterParam {
                Name = "clientSessionId", Type = typeof(decimal?), Value = clientSessionId, IsOut = true
            };
            var clientSessionUserDomainNameParam = new TransmitterParam {
                Name = "clientSessionUserDomainName", Type = typeof(string), Value = clientSessionUserDomainName, IsOut = false
            };
            var clientSessionClientVersionParam = new TransmitterParam {
                Name = "clientSessionClientVersion", Type = typeof(string), Value = clientSessionClientVersion, IsOut = false
            };
            var clientSessionServiceIdParam = new TransmitterParam {
                Name = "clientSessionServiceId", Type = typeof(string), Value = clientSessionServiceId, IsOut = false
            };
            var clientOSVersionParam = new TransmitterParam {
                Name = "clientOSVersion", Type = typeof(string), Value = clientOSVersion, IsOut = false
            };

            var telegram = new RepoQueryTelegramWrapper(typeof(ClientSession).Name, "StartSession",
                                                        new[] { clientCodeParam, clienttypecodeParam, clientipParam, clientmacParam, clientSessionAppKeyParam, clientSessionIdParam,
                                                                clientSessionUserDomainNameParam, clientSessionClientVersionParam, clientSessionServiceIdParam, clientOSVersionParam });

            ProcessTelegramm(telegram);
            clientSessionId = clientSessionIdParam.Value == null
                ? (decimal?)null
                : (decimal)SerializationHelper.ConvertToTrueType(clientSessionIdParam.Value, typeof(decimal));
        }