Exemplo n.º 1
0
 public HashKeyIndex(AbstractBufferedReader reader, Guid? guid)
 {
     _guid = guid;
     _subId = reader.ReadVInt64();
     _generation = reader.ReadVInt64();
     _keyLen = reader.ReadVUInt32();
 }
Exemplo n.º 2
0
    public WatchrAppender()
    {
        var appIdSetting = ConfigurationManager.AppSettings["watchr.appid"];

            // check local configuration to enusure appid is specified
            if (appIdSetting != null)
            {
                Guid appIdTemp = Guid.Empty;
                if (Guid.TryParse(appIdSetting, out appIdTemp))
                {
                    canProcess = true;
                    appId = appIdTemp;
                }
            }

            // create the connection.
            if (canProcess)
            {
                eventHub = hubConnection.Value.CreateHubProxy("EventHub");
                hubConnection.Value.Start().ContinueWith(StartConnection()).Wait();
                hubConnection.Value.Reconnecting += Value_Reconnecting;
                hubConnection.Value.Closed += Value_Closed;
                hubConnection.Value.Reconnected += Value_Reconnected;
                reconnectTimer.Elapsed += reconnectTimer_Elapsed;
            }

            if (canProcess && appId.HasValue && hubConnection.Value.State == ConnectionState.Connected)
            {
                eventHub.Invoke("RegisterApplication", appId).ContinueWith(RegisterApplication());
            }
    }
Exemplo n.º 3
0
        public void TestNullableViaResultClass2()
        {
            NullableClass clazz = new NullableClass();
            clazz.TestBool = true;
            clazz.TestByte = 155;
            clazz.TestChar = 'a';
            DateTime? date = new DateTime?(DateTime.Now);
            clazz.TestDateTime = date;
            clazz.TestDecimal = 99.53M;
            clazz.TestDouble = 99.5125;
            Guid? guid = new Guid?(Guid.NewGuid());
            clazz.TestGuid = guid;
            clazz.TestInt16 = 45;
            clazz.TestInt32 = 99;
            clazz.TestInt64 = 1234567890123456789;
            clazz.TestSingle = 4578.46445454112f;

            dataMapper.Insert("InsertNullable", clazz);
            clazz = null;
            clazz = dataMapper.QueryForObject<NullableClass>("GetClassNullable", 1);

            Assert.IsNotNull(clazz);
            Assert.AreEqual(1, clazz.Id);
            Assert.IsTrue(clazz.TestBool.Value);
            Assert.AreEqual(155, clazz.TestByte);
            Assert.AreEqual('a', clazz.TestChar);
            Assert.AreEqual(date.Value.ToString(), clazz.TestDateTime.Value.ToString());
            Assert.AreEqual(99.53M, clazz.TestDecimal);
            Assert.AreEqual(99.5125, clazz.TestDouble);
            Assert.AreEqual(guid, clazz.TestGuid);
            Assert.AreEqual(45, clazz.TestInt16);
            Assert.AreEqual(99, clazz.TestInt32);
            Assert.AreEqual(1234567890123456789, clazz.TestInt64);
            Assert.AreEqual(4578.46445454112f, clazz.TestSingle);
        } 
Exemplo n.º 4
0
 public HashKeyIndex(long subId, long generation, Guid? guid, uint keyLen)
 {
     _guid = guid;
     _subId = subId;
     _generation = generation;
     _keyLen = keyLen;
 }
Exemplo n.º 5
0
 public ResponseMsg(FID requestID, Guid? instance,  object returnValue)
     : base()
 {
     m_RequestID = requestID;
       m_RemoteInstance = instance;
       m_ReturnValue = returnValue;
 }
Exemplo n.º 6
0
 internal OutputSchemaChange(FrameReader reader, Guid? traceId)
 {
     TraceId = traceId;
     Change = reader.ReadString();
     Keyspace = reader.ReadString();
     Table = reader.ReadString();
 }
Exemplo n.º 7
0
        public void Sys_AccountUpdate_ShouldUpdateResponsibleContactOfIncidents()
        {
            ServiceContext.Create(new Incident
            {
                Id = IncidentId,
                Title = IncidentTitle,
                CustomerId = new CrmEntityReference(Account.EntityLogicalName, AccountId)
            });
            var incident = FindById<Incident>(IncidentId);
            Assert.That(incident, Is.Not.Null);

            NewContactId = Guid.NewGuid();
            ServiceContext.Create(new Contact
            {
                Id = NewContactId.Value,
                ParentCustomerId = new CrmEntityReference(Account.EntityLogicalName, AccountId)
            });
            var contact = FindById<Contact>(NewContactId.Value);
            Assert.That(contact, Is.Not.Null);
            ServiceContext.Update(new Account
            {
                Id = AccountId,
                PrimaryContactId = new CrmEntityReference(Contact.EntityLogicalName, NewContactId.Value)
            });
            ServiceContext.SaveChanges(); // To clean the cache

            incident = FindById<Incident>(IncidentId);
            Assert.That(incident, Is.Not.Null);
            Assert.That(incident.ResponsibleContactId, Is.Not.Null);
            Assert.That(incident.ResponsibleContactId.Id, Is.EqualTo(NewContactId));
        }
Exemplo n.º 8
0
 public Authority(Guid contactID, 
                  string username = null,
                  Guid? userID = null,
                  Guid? applicationID = null,
                  IEnumerable<SecurityBlacklist> blackList = null,
                  IEnumerable<SecurityWhitelist> whiteList = null,
                  IEnumerable<Guid> applications = null,
                  IEnumerable<Guid> roles = null,
                  IEnumerable<Experience> experiences = null,
                  IEnumerable<License> licenses = null,
                  IEnumerable<LicenseAsset> assets = null,
                  IEnumerable<LicenseAssetModelPart> parts = null,
                  IEnumerable<Guid> users = null,
                  IEnumerable<Guid> companies = null,
                  IEnumerable<Guid> rootCompanies = null
                 )
 {
     this.contactID = contactID;
     this.username = username;
     this.userID = userID;
     this.applicationID = applicationID;
     updateAuthority(blackList, whiteList);
     this.applications = (applications == null) ? new Guid[] { } : applications.ToArray();
     this.roles = (roles == null) ? new Guid[] { } : roles.ToArray();
     this.experiences = (experiences == null) ? new Experience[] { } : experiences.ToArray();
     this.licenses = (licenses == null) ? new License[] { } : licenses.ToArray();
     this.assets = (assets == null) ? new LicenseAsset[] { } : assets.ToArray();
     this.parts = (parts == null) ? new LicenseAssetModelPart[] { } : parts.ToArray();
     this.users = (users == null) ? new Guid[] { } : users.ToArray();
     this.companies = (companies == null) ? new Guid[] { } : companies.ToArray();
     this.rootCompanies = (rootCompanies == null) ? new Guid[] { } : rootCompanies.ToArray();
     this.lastUpdated = DateTime.UtcNow;
 }
 public FixedRateTreePopulater(object selectedValue, Guid contractID, bool selectAll)
     : base(selectedValue)
 {
     this.selectGroup = selectAll;
     this.selectRate = true;
     this.contractID = contractID;
 }
Exemplo n.º 10
0
 public CatalogueTreePopulater_Original(object selectedValue, Guid storeID, bool showLeafNode, bool selectLeafNodeOnly)
     : base(selectedValue)
 {
     this.showLeafNode = showLeafNode;
     this.selectLeafNodeOnly = selectLeafNodeOnly;
     this.storeID = storeID;
 }
Exemplo n.º 11
0
 public CatalogueTreePopulater_Original(object selectedValue, Guid contractID)
     : base(selectedValue)
 {
     this.showLeafNode = true;
     this.selectLeafNodeOnly = true;
     this.contractID = contractID;
 }
 /// <summary>
 /// Initializes a new instance of the Tree class.
 /// </summary>
 public AccessCheckObjectTree()
 {
     root = null;
     childNodeMap = new Dictionary<Guid, List<Guid>>();
     parentNodeMap = new Dictionary<Guid, Guid>();
     dataMap = new Dictionary<Guid, uint>();
 }
Exemplo n.º 13
0
        public static Guid GetSessionId()
        {
            if (_sessionId == null)
                _sessionId = Guid.NewGuid();

            return _sessionId.Value;
        }
Exemplo n.º 14
0
 public VoteHelper(bool forBallot, bool everyoneCanReceiveVotes)
 {
   _forBallot = forBallot;
   _everyoneCanReceiveVotes = everyoneCanReceiveVotes;
   _notInTieBreakGuid = IneligibleReasonEnum.Ineligible_Not_in_TieBreak.Value;
   _notInTieBreakGuidNullable = _notInTieBreakGuid.AsNullableGuid();
 }
Exemplo n.º 15
0
        private void bSaveNewUser_Click(object sender, EventArgs e)
        {
            if (validateUserDetails())
            {
                if (rNewUser.Checked)
                {
                    this.user_token = db.CreateUser(tEmail.Text, tPassword.Text);
                    this.Close();
                }
                else
                {
                    var token = db.GetTokenForUser(tEmail.Text, tPassword.Text);
                    if (token != null)
                    {
                    //    db.underlyingContext.users
                        this.user_token = token.Value;
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show("Could not find that user!");
                    }
                }

            }
        }
Exemplo n.º 16
0
 internal OutputSchemaChange(BEBinaryReader reader, Guid? traceId)
 {
     _traceId = traceId;
     Change = reader.ReadString();
     Keyspace = reader.ReadString();
     Table = reader.ReadString();
 }
Exemplo n.º 17
0
 public TransactionEntryWindow(Guid transactionID)
     : this()
 {
     TransactionID = transactionID;
     this.Title = "Edit Transaction";
     Mode = ModeValues.Edit;
 }
Exemplo n.º 18
0
 internal OutputSchemaChange(BEBinaryReader reader, Guid? traceID)
 {
     _traceID = traceID;
     this.Change = reader.ReadString();
     this.Keyspace= reader.ReadString();
     this.Table = reader.ReadString();
 }
Exemplo n.º 19
0
        protected void btnFilter_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(tbCode.Text.Trim()))
                ViewState["Code"] = tbCode.Text.Trim();
            else
                ViewState["Code"] = string.Empty;

            if (!string.IsNullOrEmpty(tbName.Text.Trim()))
                ViewState["Name"] = tbName.Text.Trim();
            else
                ViewState["Name"] = string.Empty;

            if (!string.IsNullOrEmpty(tbDisplayName.Text.Trim()))
                ViewState["DisplayName"] = tbDisplayName.Text.Trim();
            else
                ViewState["DisplayName"] = string.Empty;

            if (!string.IsNullOrEmpty(ddlProductType.SelectedValue))
                ViewState["ProductType"] = ddlProductType.SelectedValue;
            else
                ViewState["ProductType"] = string.Empty;

            if (!string.IsNullOrEmpty(ddlIsActive.SelectedValue))
                ViewState["IsActive"] = ddlIsActive.SelectedValue;
            else
                ViewState["IsActive"] = string.Empty;

            ProductGuid = Guid.Empty;
            gvProduct.PageIndex = 0;

            BindData();
        }
Exemplo n.º 20
0
 /// <summary>
 /// Constructor que asigna un nombre de tabla de modo de tratar con una tabla que no 
 /// sea la por defecto de blocking.
 /// Este constructor genera un nuevo valor de GUID
 /// </summary>
 /// <param name="pTableName">Nombre de tabla de marcas personalizadas.-</param>
 public BlockingMarkBase(String pTableName)
 {
     _TableName = pTableName;
     _FwkGuid = Guid.NewGuid();
     //Set default values
     SetValues();
 }
Exemplo n.º 21
0
        public static Guid GetSessionId(this Application application)
        {
            if (_sessionId == null)
                _sessionId = Guid.NewGuid();

            return _sessionId.Value;
        }
Exemplo n.º 22
0
 public Customer(XmlNode node)
 {
     foreach(XmlAttribute attribute in node.Attributes)
     {
         var value = attribute.Value;
         switch(attribute.Name)
         {
             case "ID":
                 this.ID = XmlConvert.ToGuid(value);
                 break;
             case "Code":
                 this.Code = value;
                 break;
             case "PrivateQuotePolicyID":
                 this.PrivateQuotePolicyID = XmlConvert.ToGuid(value);
                 break;
             case "PublicQuotePolicyID":
                 this.PublicQuotePolicyID = XmlConvert.ToGuid(value);
                 break;
             case "DealingPolicyID":
                 if (!string.IsNullOrWhiteSpace(value))
                 {
                     this.dealingPolicyID = XmlConvert.ToGuid(value);
                 }
                 break;
         }
     }
 }
            public VesselData(VesselData vd)
            {
                name = vd.name;
                id = vd.id;
                craftURL = vd.craftURL;
                craftPart = vd.craftPart;
                flagURL = vd.flagURL;
                vesselType = vd.vesselType;
                body = vd.body;
                orbit = vd.orbit;
                latitude = vd.latitude;
                longitude = vd.longitude;
                altitude = vd.altitude;
                height = vd.height;
                orbiting = vd.orbiting;
                owned = vd.owned;
                pqsCity = vd.pqsCity;
                pqsOffset = vd.pqsOffset;
                heading = vd.heading;
                pitch = vd.pitch;
                roll = vd.roll;

                foreach (CrewData cd in vd.crew)
                {
                    crew.Add(new CrewData(cd));
                }
            }
Exemplo n.º 24
0
        public void SortByGivenOrderTest()
        {
            var id1 = Guid.NewGuid();
            var id2 = Guid.NewGuid();
            var id3 = Guid.NewGuid();
            var id4 = Guid.NewGuid();

            var expectedOrder = new Guid?[] { id1, id2, id3, id4 };
            var items = new[]
            {
                new SomeEntity { Name = "a", Reference = id3 },
                new SomeEntity { Name = "b", Reference = id2 },
                new SomeEntity { Name = "c", Reference = id1 },
                new SomeEntity { Name = "d", Reference = id2 },
                new SomeEntity { Name = "e", Reference = id4 }
            };

            DirectedGraph.SortByGivenOrder(items, expectedOrder, item => item.Reference);
            string result = string.Join(", ", items.Select(item => item.Name));
            const string expectedResult1 = "c, b, d, a, e";
            const string expectedResult2 = "c, d, b, a, e";

            Console.WriteLine("result: " + result);
            Console.WriteLine("expectedResult1: " + expectedResult1);
            Console.WriteLine("expectedResult2: " + expectedResult2);

            Assert.IsTrue(result == expectedResult1 || result == expectedResult2, "Result '" + result + "' is not '" + expectedResult1 + "' nor '" + expectedResult2 + "'.");
        }
 public CatalogueTreePopulater(object selectedValue, bool showLeafNode, bool selectLeafNodeOnly)
     : base(selectedValue)
 {
     this.showLeafNode = showLeafNode;
     this.selectLeafNodeOnly = selectLeafNodeOnly;
     storeID = null;
 }
Exemplo n.º 26
0
 internal CommandTimeline(IInspectorContext context, DbCommand command, Guid connectionId, Guid? transactionId)
     : base(context)
 {
     _command       = command;
     _connetionId   = connectionId;
     _transactionId = transactionId;
 }
        /// <summary>
        /// Constructor. This view model constructed with 'bHookUpEvents=true' does react on model changes.
        /// </summary>
        /// <param name="viewModelStore">The store this view model belongs to.</param>
        /// <param name="diagramTreeNode">Element represented by this view model.</param>
        protected DiagramTreeNodeViewModel(ViewModelStore viewModelStore, DiagramTreeNode diagramTreeNode)
            : base(viewModelStore, diagramTreeNode.PresentationElementClass)
        {
            this.diagramTreeNode = diagramTreeNode;

            if (this.DiagramTreeNode != null)
                if (this.DiagramTreeNode.PresentationElementClass != null)
                {
                    presentationElementClassId = this.DiagramTreeNode.PresentationElementClass.Id;

                    this.EventManager.GetEvent<ModelElementLinkAddedEvent>().Subscribe(this.Store.DomainDataDirectory.GetDomainRelationship(ShapeClassReferencesDomainClass.DomainClassId),
                        true, this.DiagramTreeNode.PresentationElementClass.Id, new Action<ElementAddedEventArgs>(OnShapeElementAdded));

                    this.EventManager.GetEvent<ModelElementLinkDeletedEvent>().Subscribe(this.Store.DomainDataDirectory.GetDomainRelationship(ShapeClassReferencesDomainClass.DomainClassId),
                        true, this.DiagramTreeNode.PresentationElementClass.Id, new Action<ElementDeletedEventArgs>(OnShapeElementRemoved));

                    this.EventManager.GetEvent<ModelRolePlayerChangedEvent>().Subscribe(this.Store.DomainDataDirectory.GetDomainRole(ShapeClassReferencesDomainClass.DomainClassDomainRoleId),
                        new Action<RolePlayerChangedEventArgs>(OnShapeElementChanged));

                    this.EventManager.GetEvent<ModelElementLinkAddedEvent>().Subscribe(this.Store.DomainDataDirectory.GetDomainRelationship(RelationshipShapeClassReferencesReferenceRelationship.DomainClassId),
                        true, this.DiagramTreeNode.PresentationElementClass.Id, new Action<ElementAddedEventArgs>(OnRSShapeElementAdded));

                    this.EventManager.GetEvent<ModelElementLinkDeletedEvent>().Subscribe(this.Store.DomainDataDirectory.GetDomainRelationship(RelationshipShapeClassReferencesReferenceRelationship.DomainClassId),
                        true, this.DiagramTreeNode.PresentationElementClass.Id, new Action<ElementDeletedEventArgs>(OnRSShapeElementRemoved));

                    this.EventManager.GetEvent<ModelRolePlayerChangedEvent>().Subscribe(this.Store.DomainDataDirectory.GetDomainRole(RelationshipShapeClassReferencesReferenceRelationship.DomainRelationshipDomainRoleId),
                        new Action<RolePlayerChangedEventArgs>(OnRSShapeElementChanged));

                    if (this.DiagramTreeNode.PresentationElementClass is RelationshipShapeClass)
                        AddRSShapeElement((this.DiagramTreeNode.PresentationElementClass as RelationshipShapeClass).ReferenceRelationship);
                    else
                        AddShapeElement((this.DiagramTreeNode.PresentationElementClass as PresentationDomainClassElement).DomainClass);
                }     
        }
Exemplo n.º 28
0
 /// <summary>
 /// This method resets the object.
 /// </summary>
 public override void Reset()
 {
     mCurrentVersionID = null;
     mCurrentContentID = null;
     mNewVersionID = null;
     base.Reset();
 }
Exemplo n.º 29
0
 /// <summary>
 /// Начать обработку.
 /// </summary>
 public void Start()
 {
     if (eventId == null)
     {
         eventId = ViewModelEvents.LinkClick.AddCallback(this);
     }
 }
Exemplo n.º 30
0
		public CommandLineArguments(IEnumerable<string> arguments) {
			foreach (string arg in arguments) {
				if (arg.Length == 0)
					continue;
				if (arg[0] == '/') {
					if (arg.Equals("/singleInstance", StringComparison.OrdinalIgnoreCase))
						this.SingleInstance = true;
					else if (arg.Equals("/separate", StringComparison.OrdinalIgnoreCase))
						this.SingleInstance = false;
					else if (arg.StartsWith("/navigateTo:", StringComparison.OrdinalIgnoreCase))
						this.NavigateTo = arg.Substring("/navigateTo:".Length);
					else if (arg.StartsWith("/search:", StringComparison.OrdinalIgnoreCase))
						this.Search = arg.Substring("/search:".Length);
					else if (arg.StartsWith("/language:", StringComparison.OrdinalIgnoreCase))
						this.Language = arg.Substring("/language:".Length);
					else if (arg.Equals("/noActivate", StringComparison.OrdinalIgnoreCase))
						this.NoActivate = true;
					else if (arg.StartsWith("/fixedGuid:", StringComparison.OrdinalIgnoreCase)) {
						string guid = arg.Substring("/fixedGuid:".Length);
						if (guid.Length < 32)
							guid = guid + new string('0', 32 - guid.Length);
						Guid fixedGuid;
						if (Guid.TryParse(guid, out fixedGuid))
							this.FixedGuid = fixedGuid;
					}
					else if (arg.StartsWith("/saveDir:", StringComparison.OrdinalIgnoreCase))
						this.SaveDirectory = arg.Substring("/saveDir:".Length);
				}
				else {
					this.AssembliesToLoad.Add(arg);
				}
			}
		}
Exemplo n.º 31
0
        public List <SiteNav> GetLatestChildContentPagedList(Guid siteID, Guid?parentContentID, bool bActiveOnly, int pageSize, int pageNumber, string sortField, string sortDir)
        {
            IQueryable <vw_carrot_Content> query1 = CannedQueries.GetLatestContentByParent(db, siteID, parentContentID, bActiveOnly);

            return(PerformDataPagingQueryableContent(siteID, bActiveOnly, pageSize, pageNumber, sortField, sortDir, query1));
        }
Exemplo n.º 32
0
        public IList <ProcessInstance> GetByRegistry(Guid?registryId)
        {
            var entities = _processInstanceRepository.GetByRegistry(registryId);

            return(entities);
        }
Exemplo n.º 33
0
        public IList <ProcessInstance> Fetch(string name, Guid?doctorId, Guid?processId, Guid?patientId, ProcessInstanceState?processInstanceState, PaginationModel pagination, OrderByModel orderBy)
        {
            var entities = _processInstanceRepository.Fetch(name, doctorId, processId, patientId, processInstanceState, pagination, orderBy);

            return(entities);
        }
Exemplo n.º 34
0
        //Used for the Shift scheduling screen, while considering a location.
        public async Task<List<Sheriff>> GetSheriffsForShiftAvailabilityForLocation(int locationId, DateTimeOffset start, DateTimeOffset end, Guid? sheriffId = null)
        {
            var sheriffQuery = Db.Sheriff.AsNoTracking()
                .AsSplitQuery()
                .Where(s =>
                    (sheriffId == null || sheriffId != null && s.Id == sheriffId) &&
                    s.IsEnabled &&
                    s.HomeLocationId == locationId ||
                    s.AwayLocation.Any(al =>
                        al.LocationId == locationId && !(al.StartDate > end || start > al.EndDate)
                                                    && al.ExpiryDate == null))
                .IncludeSheriffEventsBetweenDates(start, end)
                .IncludeSheriffActingRank();

            return await sheriffQuery.ToListAsync();
        }
Exemplo n.º 35
0
 public async Task<Sheriff> GetSheriff(Guid? id,
     string badgeNumber) =>
     await Db.Sheriff.AsNoTracking()
         .FirstOrDefaultAsync(s =>
             (badgeNumber == null && id.HasValue && s.Id == id) ||
             (!id.HasValue && s.BadgeNumber == badgeNumber));
Exemplo n.º 36
0
 protected abstract bool OnConnect(Guid?token);
Exemplo n.º 37
0
 private bool IsAuthorized(Guid?token)
 {
     return(token.HasValue && CommunicationToken.Contains(token.Value));
 }
Exemplo n.º 38
0
 public virtual async Task<bool> CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default)
 {
     return await (await GetMongoQueryableAsync(cancellationToken))
         .AnyAsync(ir => ir.Id != expectedId && ir.Name == name, GetCancellationToken(cancellationToken));
 }
 public CommandGetMetadataSchema(Guid?lastKnownRuntimeID, long?lastKnownVersionNumber)
 {
     LastKnownRuntimeID     = lastKnownRuntimeID;
     LastKnownVersionNumber = lastKnownVersionNumber;
 }
Exemplo n.º 40
0
 public int GetChildNavigationCount(Guid siteID, Guid?parentPageID, bool bActiveOnly)
 {
     return(CompiledQueries.GetContentCountByParent(db, siteID, parentPageID, bActiveOnly));
 }
Exemplo n.º 41
0
 // Init
 public EcranAnimaux(Guid?pCodeAnimal = null)
 {
     InitializeComponent();
     _codeAnimal = pCodeAnimal;
     Chargment(_codeAnimal);
 }
Exemplo n.º 42
0
        public static Dictionary <Guid, List <PermissionType> > CheckAccess(Guid applicationId,
                                                                            Guid?userId, List <Guid> objectIds, PrivacyObjectType objectType, List <PermissionType> permissions)
        {
            if (!userId.HasValue)
            {
                userId = Guid.NewGuid();
            }

            if (objectIds.Count == 0)
            {
                return(new Dictionary <Guid, List <PermissionType> >());
            }

            if (permissions.Count == 0)
            {
                foreach (string s in Enum.GetNames(typeof(PermissionType)))
                {
                    PermissionType pt = PermissionType.None;
                    if (Enum.TryParse <PermissionType>(s, out pt) && pt != PermissionType.None)
                    {
                        permissions.Add(pt);
                    }
                }
            }

            SqlConnection con = new SqlConnection(ProviderUtil.ConnectionString);
            SqlCommand    cmd = new SqlCommand();

            cmd.Connection = con;

            //Add ObjectIDs
            DataTable objectIdsTable = new DataTable();

            objectIdsTable.Columns.Add("Value", typeof(Guid));

            foreach (Guid id in objectIds)
            {
                objectIdsTable.Rows.Add(id);
            }

            SqlParameter objectIdsParam = new SqlParameter("@ObjectIDs", SqlDbType.Structured);

            objectIdsParam.TypeName = "[dbo].[GuidTableType]";
            objectIdsParam.Value    = objectIdsTable;
            //end of Add ObjectIDs

            //Add Permissions
            DataTable permissionsTable = new DataTable();

            permissionsTable.Columns.Add("GuidValue", typeof(string));
            permissionsTable.Columns.Add("FirstValue", typeof(string));

            foreach (PermissionType p in permissions)
            {
                if (p == PermissionType.None)
                {
                    continue;
                }

                List <PermissionType> defaultItems = new List <PermissionType>()
                {
                    PermissionType.Create,
                    PermissionType.View,
                    PermissionType.ViewAbstract,
                    PermissionType.ViewRelatedItems,
                    PermissionType.Download
                };

                string defaultPrivacy = defaultItems.Any(d => d == p) ? RaaiVanSettings.DefaultPrivacy(applicationId) : string.Empty;

                permissionsTable.Rows.Add(p.ToString(), defaultPrivacy);
            }

            SqlParameter permissionsParam = new SqlParameter("@Permissions", SqlDbType.Structured);

            permissionsParam.TypeName = "[dbo].[StringPairTableType]";
            permissionsParam.Value    = permissionsTable;
            //end of Add Permissions

            cmd.Parameters.AddWithValue("@ApplicationID", applicationId);
            cmd.Parameters.AddWithValue("@UserID", userId);
            if (objectType != PrivacyObjectType.None)
            {
                cmd.Parameters.AddWithValue("@ObjectType", objectType.ToString());
            }
            cmd.Parameters.Add(objectIdsParam);
            cmd.Parameters.Add(permissionsParam);
            cmd.Parameters.AddWithValue("@Now", DateTime.Now);


            string spName = GetFullyQualifiedName("CheckAccess");

            string sep       = ", ";
            string arguments = "@ApplicationID" + sep + "@UserID" + sep +
                               (objectType == PrivacyObjectType.None ? "null" : "@ObjectType") + sep +
                               "@ObjectIDs" + sep + "@Permissions" + sep + "@Now";

            cmd.CommandText = ("EXEC" + " " + spName + " " + arguments);

            con.Open();
            try
            {
                IDataReader reader = (IDataReader)cmd.ExecuteReader();
                return(_parse_access_checked_items(ref reader));
            }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.PRVC);
                return(new Dictionary <Guid, List <PermissionType> >());
            }
            finally { con.Close(); }
        }
Exemplo n.º 43
0
 public DatabaseManager(string connectionString, Guid?userId = null)
 {
     _userId           = userId;
     _connectionString = connectionString;
 }
Exemplo n.º 44
0
        /// <summary>
        /// Recharge tout le formulaire, si jamais c'était une modif, remet les valeurs de départ
        /// </summary>
        /// <param name="pCodeAnimal"></param>
        private void Chargment(Guid?pCodeAnimal = null)
        {
            combo_animaux_Clients.DataSource = MgtClient.GetInstance().AfficherTout();
            combo_animaux_espece.DataSource  = (from occurence in MgtRaces.AfficherTout()
                                                select occurence.Espece).ToList <string>();
            combo_animaux_race.DataSource = (from occurence in MgtRaces.AfficherTout()
                                             where occurence.Espece == combo_animaux_espece.SelectedValue.ToString()
                                             select occurence.Race).ToList <string>();
            combo_animaux_sexe.DataSource = new List <string> {
                "Mâle", "Femmelle", "Hérmaphrodite"
            };

            TXT_animaux_code.Enabled = false;

            if (pCodeAnimal == null)
            {
                BTN_animaux_valider.Text = "Ajouter";
                combo_animaux_Clients.Focus();

                TXT_animaux_code.Text     = null;
                TXT_animaux_couleur.Text  = null;
                TXT_animaux_nom.Text      = null;
                TXT_animaux_tatouage.Text = null;
            }
            else
            {
                BTN_animaux_valider.Text = "Modifier";

                monAncienAnimal = monMgtAnimal.AfficherUneSeul(pCodeAnimal.Value);
                combo_animaux_espece.SelectedItem = monAncienAnimal.Race.Espece;
                combo_animaux_race.SelectedItem   = monAncienAnimal.Race.Race;

                int i = -1;
                foreach (string occurence in combo_animaux_sexe.Items)
                {
                    i++;
                    if (occurence[0] == monAncienAnimal.Sexe.Value)
                    {
                        combo_animaux_sexe.SelectedIndex = i;
                        break;
                    }
                }

                i = -1;
                foreach (Clients occurence in combo_animaux_Clients.Items)
                {
                    i++;
                    if (occurence.CodeClient.Value == monAncienAnimal.CodeClient.Value)
                    {
                        combo_animaux_Clients.SelectedIndex = i;
                        break;
                    }
                }

                TXT_animaux_code.Text     = monAncienAnimal.CodeAnimal.ToString();
                TXT_animaux_couleur.Text  = monAncienAnimal.Couleur;
                TXT_animaux_nom.Text      = monAncienAnimal.NomAnimal;
                TXT_animaux_tatouage.Text = monAncienAnimal.Tatouage;

                monNouvelAnimal = monAncienAnimal;
            }
        }
Exemplo n.º 45
0
        public async Task <List <MessageDto> > GetMessagesAsync(NodeConnection connection, long conversationId, ConversationType conversationType, Guid?messageId, List <AttachmentType> attachmentsTypes, bool direction = true, int length = 1000)
        {
            if (connection == null)
            {
                return(new List <MessageDto>());
            }
            GetMessagesNodeRequest request = new GetMessagesNodeRequest(conversationType, conversationId, messageId, attachmentsTypes, direction, length);

            SendRequest(connection, request);
            NodeResponse response = await GetResponseAsync(request).ConfigureAwait(false);

            if (response.ResponseType == Enums.NodeResponseType.Messages)
            {
                MessagesNodeResponse messagesResponse = (MessagesNodeResponse)response;
                return(messagesResponse.Messages);
            }
            else
            {
                throw new BadResponseException();
            }
        }
Exemplo n.º 46
0
        public ActionResult SendExpertiseDocumentToAgreement(Guid docId, string documentType, Guid?executorId = null, string taskType = null)
        {
            taskType = string.IsNullOrEmpty(taskType) ? null : taskType;
            var db              = new ncelsEntities();
            var repository      = new DrugDeclarationRepository();
            var stageRepo       = new ExpertiseStageRepository();
            var activityManager = new ActivityManager();

            switch (documentType)
            {
            case Dictionary.ExpAgreedDocType.EXP_DrugFinalDocument:
                var declarationInfo      = db.EXP_ExpertiseStageDosage.FirstOrDefault(e => e.Id == docId);
                var finalDocExecutorsIds = stageRepo.GetExecutorsByDicStageId(declarationInfo.EXP_ExpertiseStage.StageId,
                                                                              declarationInfo.EXP_ExpertiseStage.EXP_DrugDeclaration.TypeId)
                                           .Select(e => e.Id).ToArray();
                activityManager.SendToExecution(Dictionary.ExpActivityType.FinalDocAgreement, docId,
                                                Dictionary.ExpAgreedDocType.EXP_DrugFinalDocument, taskType ?? Dictionary.ExpTaskType.Agreement,
                                                declarationInfo.EXP_DrugDosage.RegNumber, declarationInfo.EXP_DrugDosage.EXP_DrugDeclaration.CreatedDate, finalDocExecutorsIds);
                var primaryDocStatus = repository.GetPrimaryFinalDocumentStatus(docId);
                return(Json(primaryDocStatus.Name, JsonRequestBehavior.AllowGet));

            case Dictionary.ExpAgreedDocType.Letter:
                var  primaryRepo = new DrugPrimaryRepository();
                bool isSigning   = taskType == Dictionary.ExpTaskType.Signing;
                var  letter      = primaryRepo.GetCorespondence(docId.ToString());
                if (isSigning)
                {
                    var stageSupervisor = stageRepo.GetStageSupervisor(letter.StageId, letter.EXP_DrugDeclaration.TypeId);
                    activityManager.SendToExecution(Dictionary.ExpActivityType.ExpertiseLetterSigning, docId,
                                                    Dictionary.ExpAgreedDocType.Letter, Dictionary.ExpTaskType.Signing,
                                                    letter.NumberLetter, letter.DateCreate, stageSupervisor.Id);
                    return(Json(
                               DictionaryHelper.GetDicItemByCode(CodeConstManager.STATUS_ONSIGNING,
                                                                 CodeConstManager.STATUS_ONSIGNING).Name, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    var letterExecutorsIds = stageRepo.GetExecutorsByDicStageId(letter.StageId, letter.EXP_DrugDeclaration.TypeId).Select(e => e.Id).ToArray();
                    activityManager.SendToExecution(Dictionary.ExpActivityType.ExpertiseLetterAgreement, docId,
                                                    Dictionary.ExpAgreedDocType.Letter, Dictionary.ExpTaskType.Agreement,
                                                    letter.NumberLetter, letter.DateCreate, letterExecutorsIds);
                    return(Json(
                               DictionaryHelper.GetDicItemByCode(CodeConstManager.STATUS_ONAGREEMENT,
                                                                 CodeConstManager.STATUS_ONAGREEMENT).Name, JsonRequestBehavior.AllowGet));
                }

            case Dictionary.ExpAgreedDocType.CertificateOfCompletion:
                var coc = db.EXP_CertificateOfCompletion.FirstOrDefault(e => e.Id == docId);
                if (coc != null)
                {
                    var certExecutorsIds = stageRepo.GetExecutorsByDicStageId(coc.DicStageId.Value, coc.EXP_DrugDeclaration.TypeId).Select(e => e.Id).ToArray();
                    activityManager.SendToExecution(Dictionary.ExpActivityType.CertificateOfComplitionAgreement, docId,
                                                    Dictionary.ExpAgreedDocType.CertificateOfCompletion, taskType ?? Dictionary.ExpTaskType.Agreement,
                                                    string.Empty, coc.CreateDate, certExecutorsIds);
                }
                return(Json(DictionaryHelper.GetDicItemByCode(CodeConstManager.STATUS_ONAGREEMENT,
                                                              CodeConstManager.STATUS_ONAGREEMENT).Name, JsonRequestBehavior.AllowGet));
            }
            return(null);
        }
Exemplo n.º 47
0
 public override async Task <IActionResult> Details(Guid?id)
 {
     return(await Task.Run(() => NotFound()));
 }
Exemplo n.º 48
0
        /// <summary>
        /// 网页快照尺寸,Full Screenshot则设置Size.Empty
        /// </summary>
        /// <param name="size"></param>
        internal static void xSnapshot(WebBrowser browser, Size size, string saveFileDirectory, Guid?fileID = null)
        {
            browser.ScrollBarsEnabled = false;
            browser.Size = new Size(Screen.PrimaryScreen.WorkingArea.Width, 10240);
            var arg = (ScriptingContext)browser.ObjectForScripting;

            if (fileID == null)
            {
                fileID = CryptoManaged.MD5Hash(arg.RequestUrl.OriginalString);
            }
            string savePath = Path.Combine(saveFileDirectory, string.Format("{0}.png", fileID));

            try
            {
                var js = new StringBuilder();
                js.AppendFormat("document.body.setAttribute('_CurrentSnapshot', '{0}');", fileID);
                js.Append(@"    window.addEventListener('load', function () {
        window.scrollTo(0, document.documentElement.offsetHeight);
    });
");
                xInvoke(browser, js.ToString());
                browser.Size = size == Size.Empty ? browser.Document.Body.ScrollRectangle.Size : size;
                using (var img = new Bitmap(browser.Width, browser.Height))
                {
                    NativeMethods.DrawTo(browser.ActiveXInstance, img, Color.White);
                    img.Save(savePath, System.Drawing.Imaging.ImageFormat.Png);
                    App.LogInfo("xSnapshot {0} {1}", browser.Url, savePath);
                }
            }
            catch (Exception ex)
            {
                App.LogError(ex, "xSnapshot {0} {1}", browser.Url, savePath);
            }
        }
Exemplo n.º 49
0
        public async Task <IActionResult> List(Guid?appId)
        {
            if (appId == null)
            {
                return(NotFound());
            }
            var eDocumentList = (await _dataService.GetDtoAsync <EDocumentListDTO>(extraParameters: new object[] { $"\'{appId}\'" })).ToList();
            var eDocumentIds  = eDocumentList.Select(x => x.Id);

            var branchList        = (await _dataService.GetDtoAsync <BranchListDTO>(x => x.ApplicationId == appId)).ToList();
            var branchContractors = _dataService.GetEntity <BranchEDocument>()
                                    .Where(x => eDocumentIds.Contains(x.EDocumentId)).ToList();

            foreach (var contr in eDocumentList)
            {
                contr.ListOfBranches = new List <string>();
                contr.ListOfBranches.AddRange(branchList.Where(br =>
                                                               branchContractors.Where(x => x.EDocumentId == contr.Id).Select(x => x.BranchId).Contains(br.Id)).Select(st => st.Name + ',' + st.PhoneNumber));
            }

            var app = (await _dataService.GetDtoAsync <AppStateDTO>(x => x.Id == appId))?.FirstOrDefault();

            if (app == null)
            {
                return(NotFound());
            }
            ViewBag.appId   = appId;
            ViewBag.AppSort = app.AppSort;
            string eDocType;

            switch (app.AppType)
            {
            case "PRL":
                eDocType = "ManufactureDossier";
                break;

            case "IML":
                eDocType = "ImportDossier";
                break;

            case "TRL":
                eDocType = "";
                break;

            default:
                return(NotFound());
            }

            ViewBag.eDocType  = eDocType;
            ViewBag.IsAddable = _entityStateHelper.ApplicationAddability(appId.Value).IsEdocument;
            ViewBag.appType   = app.AppType;

            eDocumentList.ForEach(dto => dto.IsEditable = _entityStateHelper.IsEditableEdoc(dto.Id, false) ?? false);

            if (app.AppSort == "AddBranchApplication")
            {
                eDocumentList = eDocumentList.OrderBy(x => x.IsFromLicense).ToList();
                return(PartialView("List_AddBranchApplication", eDocumentList));
            }
            if (app.AppSort == "AddBranchInfoApplication")
            {
                return(PartialView("List_AddBranchInfoApplication", eDocumentList));
            }
            return(PartialView(eDocumentList));
        }
Exemplo n.º 50
0
 /// <summary>
 /// 初始化绑定器,返回是否成功
 /// </summary>
 /// <param name="categoryId">类目Id</param>
 /// <returns></returns>
 public abstract bool Init(Guid?categoryId);
Exemplo n.º 51
0
 public TestLogWithProperties(DateTime?timestamp, Device device, Guid?sid = default(Guid?), IDictionary <string, string> properties = default(IDictionary <string, string>))
     : base(device, timestamp, sid, null, properties)
 {
 }
Exemplo n.º 52
0
        public async Task <IActionResult> CreateOnOpen(Guid appId, string documentType, string sort, string appType, Guid?msgId)
        {
            if (appId == Guid.Empty)
            {
                return(NotFound());
            }
            var dto = new EDocumentDetailsDTO()
            {
                EDocumentType = documentType,
                DateFrom      = DateTime.Now
            };
            var id = _dataService.Add <EDocument>(dto);
            await _dataService.SaveChangesAsync();

            return(msgId == null
                ? RedirectToAction("Edit", new { id, appId, sort, appType })
                : RedirectToAction("EditMsg", new { id, msgId }));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="WasteRegisterPublicApiApiModelsRequestsWasteRegisterWasteRecordCardKeoExcavatedV1UpdateKeoExcavatedRequest" /> class.
 /// </summary>
 /// <param name="keoExcavatedId">Id wpisu Wydobyte odpady.</param>
 /// <param name="wasteMassExcavated">Masa odpadów wydobytych ze składowiska [Mg].</param>
 /// <param name="excavatedDate">Data wydobycia.</param>
 /// <param name="installationName">Nazwa instalacji.</param>
 public WasteRegisterPublicApiApiModelsRequestsWasteRegisterWasteRecordCardKeoExcavatedV1UpdateKeoExcavatedRequest(Guid?keoExcavatedId = default(Guid?), double?wasteMassExcavated = default(double?), DateTime?excavatedDate = default(DateTime?), string installationName = default(string))
 {
     this.KeoExcavatedId     = keoExcavatedId;
     this.WasteMassExcavated = wasteMassExcavated;
     this.ExcavatedDate      = excavatedDate;
     this.InstallationName   = installationName;
 }
Exemplo n.º 54
0
        private void InitializeTimelineRecord(Guid timelineId, Guid timelineRecordId, Guid?parentTimelineRecordId, string recordType, string displayName, string refName, int order)
        {
            _mainTimelineId         = timelineId;
            _record.Id              = timelineRecordId;
            _record.RecordType      = recordType;
            _record.Name            = displayName;
            _record.RefName         = refName;
            _record.Order           = order;
            _record.PercentComplete = 0;
            _record.State           = TimelineRecordState.Pending;
            _record.ErrorCount      = 0;
            _record.WarningCount    = 0;

            if (parentTimelineRecordId != null && parentTimelineRecordId.Value != Guid.Empty)
            {
                _record.ParentId = parentTimelineRecordId;
            }

            var configuration = HostContext.GetService <IConfigurationStore>();

            _record.WorkerName = configuration.GetSettings().AgentName;

            _jobServerQueue.QueueTimelineRecordUpdate(_mainTimelineId, _record);
        }
Exemplo n.º 55
0
 public async Task <IEnumerable <TeamRosterEntity> > GetAllTeamsAsync(Guid?seasonInfoId)
 {
     return(await _table.ReadManyAsync(seasonInfoId.HasValue? "SeasonInfoId = @seasonInfoId" : "SeasonInfoId is null", new { seasonInfoId }));
 }
Exemplo n.º 56
0
 internal void Log(MessageType tp, string from, string text, Exception error = null, Guid?related = null)
 {
     //if (InstrumentationEnabled && tp >= MessageType.Error) Interlocked.Increment(ref m_stat_WorkerLoggedError);
     if (tp < LogLevel)
     {
         return;
     }
     App.Log.Write(new Message
     {
         Type      = tp,
         Topic     = SysConsts.LOG_TOPIC_KDB,
         From      = "{0}.{1}".Args(GetType().Name, from),
         Text      = text,
         Exception = error,
         RelatedTo = related ?? Guid.Empty
     });
 }
Exemplo n.º 57
0
        public async Task <dynamic> GetVacancyDetails(Guid?VacancyID)
        {
            var result = await _requestService.getDataFromServiceAuthority("api/CandidateJob/GetVacancyDetails?VacancyID=" + VacancyID.ToString());

            return(result);
        }
Exemplo n.º 58
0
        public virtual Task SetContextAsync(ClaimsPrincipal user)
        {
            if (user == null || !user.Claims.Any())
            {
                return(Task.FromResult(0));
            }

            var claimsDict = user.Claims.GroupBy(c => c.Type).ToDictionary(c => c.Key, c => c.Select(v => v));

            var subject = GetClaimValue(claimsDict, "sub");

            if (Guid.TryParse(subject, out var subIdGuid))
            {
                UserId = subIdGuid;
            }

            var clientId      = GetClaimValue(claimsDict, "client_id");
            var clientSubject = GetClaimValue(claimsDict, "client_sub");
            var orgApi        = false;

            if (clientSubject != null)
            {
                if (clientId?.StartsWith("installation.") ?? false)
                {
                    if (Guid.TryParse(clientSubject, out var idGuid))
                    {
                        InstallationId = idGuid;
                    }
                }
                else if (clientId?.StartsWith("organization.") ?? false)
                {
                    if (Guid.TryParse(clientSubject, out var idGuid))
                    {
                        OrganizationId = idGuid;
                        orgApi         = true;
                    }
                }
            }

            DeviceIdentifier = GetClaimValue(claimsDict, "device");

            Organizations = new List <CurrentContentOrganization>();
            if (claimsDict.ContainsKey("orgowner"))
            {
                Organizations.AddRange(claimsDict["orgowner"].Select(c =>
                                                                     new CurrentContentOrganization
                {
                    Id   = new Guid(c.Value),
                    Type = OrganizationUserType.Owner
                }));
            }
            else if (orgApi && OrganizationId.HasValue)
            {
                Organizations.Add(new CurrentContentOrganization
                {
                    Id   = OrganizationId.Value,
                    Type = OrganizationUserType.Owner
                });
            }

            if (claimsDict.ContainsKey("orgadmin"))
            {
                Organizations.AddRange(claimsDict["orgadmin"].Select(c =>
                                                                     new CurrentContentOrganization
                {
                    Id   = new Guid(c.Value),
                    Type = OrganizationUserType.Admin
                }));
            }

            if (claimsDict.ContainsKey("orguser"))
            {
                Organizations.AddRange(claimsDict["orguser"].Select(c =>
                                                                    new CurrentContentOrganization
                {
                    Id   = new Guid(c.Value),
                    Type = OrganizationUserType.User
                }));
            }

            if (claimsDict.ContainsKey("orgmanager"))
            {
                Organizations.AddRange(claimsDict["orgmanager"].Select(c =>
                                                                       new CurrentContentOrganization
                {
                    Id   = new Guid(c.Value),
                    Type = OrganizationUserType.Manager
                }));
            }

            if (claimsDict.ContainsKey("orgcustom"))
            {
                Organizations.AddRange(claimsDict["orgcustom"].Select(c =>
                                                                      new CurrentContentOrganization
                {
                    Id          = new Guid(c.Value),
                    Type        = OrganizationUserType.Custom,
                    Permissions = SetOrganizationPermissionsFromClaims(c.Value, claimsDict)
                }));
            }

            return(Task.FromResult(0));
        }
Exemplo n.º 59
0
        /// <summary>
        /// Publishes the gift event.
        /// </summary>
        /// <param name="transactionId">The transaction identifier.</param>
        /// <param name="eventType">Type of the event.</param>
        /// <param name="gatewaySupportedCardTypesDefinedValueGuid">[Optional] The <see cref="Guid"/> of the <see cref="DefinedValue"/> that indicates the credit card types supported by the <see cref="FinancialGateway"/> for a specified currency.</param>
        /// <param name="gatewayCurrencyUnitMultiple">[Optional] The <see cref="Guid"/> of the <see cref="DefinedValue"/> that indicates the "unit multiple" (e.g., 100 for dollars) of the currency specified by the gatway.</param>
        public static void PublishTransactionEvent(int transactionId, string eventType = null, Guid?gatewaySupportedCardTypesDefinedValueGuid = null, Guid?gatewayCurrencyUnitMultiple = null)
        {
            using (var rockContext = new RockContext())
            {
                var transactionService = new FinancialTransactionService(rockContext);
                var gateway            = transactionService.Queryable()
                                         .AsNoTracking()
                                         .Include(t => t.FinancialGateway)
                                         .Where(t => t.Id == transactionId)
                                         .Select(t => t.FinancialGateway)
                                         .FirstOrDefault();

                var gatewayComponent     = gateway?.GetGatewayComponent();
                var searchKeyTiedGateway = gatewayComponent as ISearchKeyTiedGateway;
                var searchKeyTypeGuid    = searchKeyTiedGateway?.GetPersonSearchKeyTypeGuid(gateway);
                var data = GetGiftWasGivenMessageData(rockContext, transactionId, searchKeyTypeGuid, gatewaySupportedCardTypesDefinedValueGuid, gatewayCurrencyUnitMultiple);

                if (data != null)
                {
                    var statusGateway = gatewayComponent as IStatusProvidingGateway;

                    if (eventType.IsNullOrWhiteSpace())
                    {
                        eventType =
                            statusGateway.IsPendingStatus(data.FinancialTransaction.Status) ? GiftEventTypes.GiftPending :
                            statusGateway.IsSuccessStatus(data.FinancialTransaction.Status) ? GiftEventTypes.GiftSuccess :
                            statusGateway.IsFailureStatus(data.FinancialTransaction.Status) ? GiftEventTypes.GiftFailure :
                            null;
                    }

                    if (!eventType.IsNullOrWhiteSpace())
                    {
                        var message = new GiftWasGivenMessage
                        {
                            EventType            = eventType,
                            Address              = data.Address,
                            FinancialTransaction = data.FinancialTransaction,
                            Person = data.Person,
                            Time   = RockDateTime.Now
                        };

                        _ = RockMessageBus.PublishAsync <GivingEventQueue, GiftWasGivenMessage>(message);
                    }
                }
            }
        }
Exemplo n.º 60
0
        public async Task <TeamRosterEntity> GetByTeamNameAsync(string teamName, Guid?seasonInfoId)
        {
            var seasonInfoNotNull = seasonInfoId == null ? "AND SeasonInfoId is null" : "AND SeasonInfoId = @seasonInfoId";

            return((await _table.ReadManyAsync($"TeamName = @teamName {seasonInfoNotNull}", new { teamName, seasonInfoId })).FirstOrDefault());
        }