Exemple #1
1
        public ActionResult ChangeName(Guid id, string name, int version)
        {
            var command = new RenameInventoryItem(id, name, version);
            _bus.Send(command);

            return RedirectToAction("Index");
        }
 public User Get(Guid id)
 {
     using (var db = base.NewDB())
     {
         return db.Users.Get(id);
     }
 }
        public HttpResponseMessageWrapper<Suggestion> GetSuggestion(HttpRequestMessage req, Guid id)
        {
            Operation operation = null;
            HttpStatusCode code = AuthenticateUser(req);
            if (code != HttpStatusCode.OK)
            {   // user not authenticated
                return ReturnResult<Suggestion>(req, operation, code);
            }

            try
            {
                Suggestion suggestion = this.SuggestionsStorageContext.Suggestions.Single<Suggestion>(s => s.ID == id);
                if (!ValidateEntityOwnership(suggestion.EntityID, suggestion.EntityType))
                {   // entity associated with suggestions does not belong to the authenticated user, return 403 Forbidden
                    TraceLog.TraceError("Associated entity does not belong to current user)");
                    return ReturnResult<Suggestion>(req, operation, HttpStatusCode.Forbidden);
                }
                var response = ReturnResult<Suggestion>(req, operation, suggestion, HttpStatusCode.OK);
                response.Headers.CacheControl = new CacheControlHeaderValue() { NoCache = true };
                return response;
            }
            catch (Exception ex)
            {   // suggestion not found - return 404 Not Found
                TraceLog.TraceException("Resource not found", ex);
                return ReturnResult<Suggestion>(req, operation, HttpStatusCode.NotFound);
            }
        }
        /// <summary>
        /// Inserts a row in the mp_ContentWorkflow table. Returns rows affected count.
        /// </summary>
        /// <param name="guid"> guid </param>
        /// <param name="siteGuid"> siteGuid </param>
        /// <param name="moduleGuid"> moduleGuid </param>
        /// <param name="createdDateUtc"> createdDateUtc </param>
        /// <param name="userGuid"> userGuid </param>
        /// <param name="status"> status </param>
        /// <param name="contentText"> contentText </param>
        /// <param name="customData"> customData </param>
        /// <param name="customReferenceNumber"> customReferenceNumber </param>
        /// <param name="customReferenceGuid"> customReferenceGuid </param>
        /// <returns>int</returns>
        public static int Create(
            Guid guid,
            Guid siteGuid,
            Guid moduleGuid,
            Guid userGuid,
            DateTime createdDateUtc,
            string contentText,
            string customData,
            int customReferenceNumber,
            Guid customReferenceGuid,
            string status)
        {
            SqlParameterHelper sph = new SqlParameterHelper(ConnectionString.GetWriteConnectionString(), "mp_ContentWorkflow_Insert", 10);
            sph.DefineSqlParameter("@Guid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, guid);
            sph.DefineSqlParameter("@SiteGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, siteGuid);
            sph.DefineSqlParameter("@ModuleGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, moduleGuid);
            sph.DefineSqlParameter("@CreatedDateUtc", SqlDbType.DateTime, ParameterDirection.Input, createdDateUtc);
            sph.DefineSqlParameter("@UserGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, userGuid);
            sph.DefineSqlParameter("@Status", SqlDbType.NVarChar, 20, ParameterDirection.Input, status);
            sph.DefineSqlParameter("@ContentText", SqlDbType.NVarChar, -1, ParameterDirection.Input, contentText);
            sph.DefineSqlParameter("@CustomData", SqlDbType.NVarChar, -1, ParameterDirection.Input, customData);

            //object customReferenceNumberVal = customReferenceNumber.HasValue ? (object)customReferenceNumber.Value : DBNull.Value;
            sph.DefineSqlParameter("@CustomReferenceNumber", SqlDbType.Int, ParameterDirection.Input, customReferenceNumber);

            //object customReferenceGuidVal = customReferenceGuid.HasValue ? (object)customReferenceGuid.Value : DBNull.Value;
            sph.DefineSqlParameter("@CustomReferenceGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, customReferenceGuid);

            int rowsAffected = sph.ExecuteNonQuery();
            return rowsAffected;
        }
        public async Task<NotificationMovementsSummary> GetById(Guid notificationId)
        {
            await notificationAuthorization.EnsureAccessAsync(notificationId);

            var summaryData = await context.NotificationApplications
                .GroupJoin(
                    context.ShipmentInfos,
                    notification => notification.Id,
                    shipment => shipment.NotificationId,
                    (notification, shipments) => new { Notification = notification, Shipment = shipments.FirstOrDefault() })
                .Join(context.NotificationAssessments,
                    x => x.Notification.Id,
                    na => na.NotificationApplicationId,
                    (x, na) => new { x.Notification, x.Shipment, NotificationAssessment = na })
                .Select(x => new
                {
                    NotificationId = x.Notification.Id,
                    x.Notification.NotificationType,
                    x.Notification.NotificationNumber,
                    NumberOfShipments = x.Shipment == null ? 0 : x.Shipment.NumberOfShipments,
                    Quantity = x.Shipment == null ? 0 : x.Shipment.Quantity,
                    Units = x.Shipment == null ? ShipmentQuantityUnits.Tonnes : x.Shipment.Units,
                    NotificationStatus = x.NotificationAssessment.Status,
                    x.Notification.CompetentAuthority
                })
                .SingleAsync(x => x.NotificationId == notificationId);

            var totalMovements = await context.Movements
                .Where(m => 
                    m.NotificationId == notificationId)
                .CountAsync();

            var currentActiveLoads = await context.Movements
                .Where(m => 
                    m.NotificationId == notificationId
                    && (m.Status == MovementStatus.Submitted 
                        || m.Status == MovementStatus.Received) 
                    && m.Date < SystemTime.UtcNow)
                .CountAsync();

            var financialGuaranteeCollection =
                await context.FinancialGuarantees.SingleAsync(x => x.NotificationId == notificationId);

            var financialGuarantee = financialGuaranteeCollection.GetCurrentApprovedFinancialGuarantee() ??
                                     financialGuaranteeCollection.GetLatestFinancialGuarantee();

            return NotificationMovementsSummary.Load(summaryData.NotificationId,
                summaryData.NotificationNumber,
                summaryData.NotificationType,
                summaryData.NumberOfShipments,
                totalMovements,
                financialGuarantee == null ? 0 : financialGuarantee.ActiveLoadsPermitted.GetValueOrDefault(),
                currentActiveLoads,
                summaryData.Quantity,
                (await quantity.Received(notificationId)).Quantity,
                summaryData.Units,
                financialGuarantee == null ? FinancialGuaranteeStatus.AwaitingApplication : financialGuarantee.Status,
                summaryData.CompetentAuthority,
                summaryData.NotificationStatus);
        }
 public AccountRegisteredEvent(Guid accountId, string name, string email, int initialBalance)
 {
     AccountId = accountId;
     Name = name;
     Email = email;
     InitialBalance = initialBalance;
 }
 public UpdateCommitteeEvent(Guid committeeId, Guid departmentId, string name, string mandate)
 {
     CommitteeId = committeeId;
     DepartmentId = departmentId;
     Name = name;
     Mandate = mandate;
 }
        public bool checkTwitterFeedExists(string Id, Guid Userid, string messageId)
        {
            using (NHibernate.ISession session = SessionFactory.GetNewSession())
            {
                using (NHibernate.ITransaction transaction = session.BeginTransaction())
                {
                    try
                    {
                        NHibernate.IQuery query = session.CreateQuery("from TwitterFeed where UserId = :userid and ProfileId = :Twtuserid and MessageId = :messid");
                        query.SetParameter("userid", Userid);
                        query.SetParameter("Twtuserid", Id);
                        query.SetParameter("messid", messageId);
                        var result = query.UniqueResult();

                        if (result == null)
                            return false;
                        else
                            return true;

                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                        return true;
                    }

                }
            }
        }
        public Core.Business.OperateSort Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectOperateSort");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.OperateSort operateSort = new Core.Business.OperateSort();

                if (!reader.IsDBNull(0)) operateSort.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) operateSort.OperateSortName = reader.GetString(1);

                reader.Close();
                return operateSort;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
 public static object MakeGuidParam(Guid? d)
 {
     if (d == null || d == Guid.Empty)
         return DBNull.Value;
     else
         return d;
 }
Exemple #11
1
 /// <summary>
 /// Constructor with all fields except primary key fields
 /// </summary>
 public BusinessAccount(Guid id, int businessAccountTypeId, string fullName, string shortName, Guid updatedByUserId, string updatedDatetime)
 {
     this.Id = id;
     this.BusinessAccountTypeId = businessAccountTypeId;
     this.FullName = fullName;
     this.ShortName = shortName;
 }
 private Subtree CreateSubTreeFromCode(Guid guid, string code)
 {
     CodeBlockNode commentCode;
     var cbn = GraphToDSCompiler.GraphUtilities.Parse(code, out commentCode) as CodeBlockNode;
     var subtree = null == cbn ? new Subtree(null, guid) : new Subtree(cbn.Body, guid);
     return subtree;
 }
Exemple #13
1
 public Boolean addSkillToRecruitee(Guid RecruiteeId, String SkillId)
 {
     RecruiteeManager mgr = new RecruiteeManager();
     Recruitee rec = Recruitee.createRecruitee(RecruiteeId, null, 0, "", "", "", "", "", "", "");
     Recruitee obj = mgr.selectRecruiteeById(rec);
     return mgr.addSkillToRecruitee(obj, SkillId);
 }
Exemple #14
1
 public static bool Delete(Guid pollGuid)
 {
     SqlParameterHelper sph = new SqlParameterHelper(ConnectionString.GetWriteConnectionString(), "mp_Polls_Delete", 1);
     sph.DefineSqlParameter("@PollGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, pollGuid);
     int rowsAffected = sph.ExecuteNonQuery();
     return (rowsAffected > 0);
 }
Exemple #15
1
 public static IDataReader GetActivePolls(Guid siteGuid)
 {
     SqlParameterHelper sph = new SqlParameterHelper(ConnectionString.GetReadConnectionString(), "mp_Polls_SelectActive", 2);
     sph.DefineSqlParameter("@SiteGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, siteGuid);
     sph.DefineSqlParameter("@CurrentTime", SqlDbType.DateTime, ParameterDirection.Input, DateTime.UtcNow);
     return sph.ExecuteReader();
 }
 internal ReplicationCursor(DirectoryServer server, string partition, Guid guid, long filter)
 {
     this.partition = partition;
     this.invocationID = guid;
     this.USN = filter;
     this.server = server;
 }
Exemple #17
1
 public static int Add(
     Guid pollGuid,
     Guid siteGuid,
     String question,
     bool anonymousVoting,
     bool allowViewingResultsBeforeVoting,
     bool showOrderNumbers,
     bool showResultsWhenDeactivated,
     bool active,
     DateTime activeFrom,
     DateTime activeTo)
 {
     SqlParameterHelper sph = new SqlParameterHelper(ConnectionString.GetWriteConnectionString(), "mp_Polls_Insert", 10);
     sph.DefineSqlParameter("@PollGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, pollGuid);
     sph.DefineSqlParameter("@SiteGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, siteGuid);
     sph.DefineSqlParameter("@Question", SqlDbType.NVarChar, 255, ParameterDirection.Input, question);
     sph.DefineSqlParameter("@AnonymousVoting", SqlDbType.Bit, ParameterDirection.Input, anonymousVoting);
     sph.DefineSqlParameter("@AllowViewingResultsBeforeVoting", SqlDbType.Bit, ParameterDirection.Input, allowViewingResultsBeforeVoting);
     sph.DefineSqlParameter("@ShowOrderNumbers", SqlDbType.Bit, ParameterDirection.Input, showOrderNumbers);
     sph.DefineSqlParameter("@ShowResultsWhenDeactivated", SqlDbType.Bit, ParameterDirection.Input, showResultsWhenDeactivated);
     sph.DefineSqlParameter("@Active", SqlDbType.Bit, ParameterDirection.Input, active);
     sph.DefineSqlParameter("@ActiveFrom", SqlDbType.DateTime, ParameterDirection.Input, activeFrom);
     sph.DefineSqlParameter("@ActiveTo", SqlDbType.DateTime, ParameterDirection.Input, activeTo);
     int rowsAffected = sph.ExecuteNonQuery();
     return rowsAffected;
 }
        public bool IsProfileAllreadyExist(Guid UserId, string WPUserId)
        {
            using (NHibernate.ISession session = SessionFactory.GetNewSession())
            {
                //After Session creation, start Transaction.
                using (NHibernate.ITransaction transaction = session.BeginTransaction())
                {
                    try
                    {
                        //Proceed action, to Check if FacebookUser is Exist in database or not by UserId and FbuserId.
                        // And Set the reuired paremeters to find the specific values.
                        List<Domain.Socioboard.Domain.WordpressAccount> alst = session.CreateQuery("from WordpressAccount where UserId = :userid and WpUserId = :WpUserId")
                        .SetParameter("userid", UserId)
                        .SetParameter("WpUserId", WPUserId)
                        .List<Domain.Socioboard.Domain.WordpressAccount>()
                        .ToList<Domain.Socioboard.Domain.WordpressAccount>();
                        if (alst.Count == 0 || alst == null)
                            return false;
                        else
                            return true;
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                        return true;
                    }

                }//End Transaction
            }//End session
        }
        public Domain.Socioboard.Domain.WordpressAccount GetWordpressAccountById(Guid id, string wpid)
        {
            using (NHibernate.ISession session = SessionFactory.GetNewSession())
            {
                //After Session creation, start Transaction.
                using (NHibernate.ITransaction transaction = session.BeginTransaction())
                {
                    try
                    {
                        //Proceed action, to Check if FacebookUser is Exist in database or not by UserId and FbuserId.
                        // And Set the reuired paremeters to find the specific values.
                        NHibernate.IQuery query = session.CreateQuery("from WordpressAccount where UserId = :userid and WpUserId = :WpUserId");
                        query.SetParameter("userid", id);
                        query.SetParameter("WpUserId", wpid);
                        return (Domain.Socioboard.Domain.WordpressAccount)query.UniqueResult();
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                        return null;   
                    }

                }//End Transaction
            }//End session
        }
Exemple #20
1
        static void Main()
        {
            CreateRoles();

            using (WorkflowRuntime workflowRuntime = new WorkflowRuntime())
            {
                workflowRuntime.StartRuntime();

                // Load the workflow type.
                Type type = typeof(PurchaseOrderWorkflow);

                ExternalDataExchangeService dataService = new ExternalDataExchangeService();
                workflowRuntime.AddService(dataService);

                poImpl = new StartPurchaseOrder();
                dataService.AddService(poImpl);

                workflowRuntime.WorkflowCompleted += OnWorkflowCompleted;
                workflowRuntime.WorkflowTerminated += OnWorkflowTerminated;

                WorkflowInstance instance = workflowRuntime.CreateWorkflow(type);
                workflowInstanceId = instance.InstanceId;
                instance.Start();

                SendPORequestMessage();

                waitHandle.WaitOne();

                workflowRuntime.StopRuntime();
            }
        }
Exemple #21
1
 public TaskEventArgs(Guid instanceId, string id, string assignee, string text)
     :base(instanceId)
 {
     this.idValue = id;
     this.assigneeValue = assignee;
     this.textValue = text;
 }
		/// <summary>
		/// Gets the draft data for the media entity with the given id.
		/// </summary>
		/// <param name="id">The id</param>
		/// <param name="type">The media type</param>
		/// <returns>The draft media data, null if the data wasn't found</returns>
		public virtual byte[] GetDraft(Guid id, MediaType type = MediaType.Media) {
			var path = GetPath(id, true, type);

			if (File.Exists(path))
				return File.ReadAllBytes(path);
			return null;
		}
Exemple #23
1
        public static bool HasValidSignature(string fileName) {
            try {
                if (_isValidCache.Contains(fileName)) {
                    return true;
                }
                var wtd = new WinTrustData(fileName);
                var guidAction = new Guid(WINTRUST_ACTION_GENERIC_VERIFY_V2);
                WinVerifyTrustResult result = WinTrust.WinVerifyTrust(INVALID_HANDLE_VALUE, guidAction, wtd);
                bool ret = (result == WinVerifyTrustResult.Success);

                if (ret) {
                    _isValidCache.Add(fileName);
                }
#if COAPP_ENGINE_CORE
                var response = Event<GetResponseInterface>.RaiseFirst();

                if( response != null ) {
                    response.SignatureValidation(fileName, ret, ret ? Verifier.GetPublisherInformation(fileName)["PublisherName"] : null);
                }
#endif
                return ret;
            } catch (Exception) {
                return false;
            }
        }
 public void CloseById(Guid id)
 {
     var delAllocation = _unitOfWork.OtherDispatchAllocationRepository.Get().FirstOrDefault(allocation => allocation.OtherDispatchAllocationID == id);
     if (delAllocation != null) delAllocation.IsClosed = true;
     _unitOfWork.OtherDispatchAllocationRepository.Add(delAllocation);
     _unitOfWork.Save();
 }
        public Tracker(string accountName, string keyValue)
        {
            _applicationId = IdUtil.ApplicationId();
            _deviceId = IdUtil.DeviceId();
            _anid = IdUtil.GetAnidFromOs();
            _appTitle = IdUtil.ApplicationName();
            _adsRefreshRate = 3;
            _pubCenterAdsId = new List<string>();
            _adsReady = false;

            // Due to Disallowed key in RowKey, /, \, #, ? needs to be removed
            // And excel cannot allow "=" at the beginning
            foreach (var s in _invalidRowKeyChar) {
                _deviceId = _deviceId.Replace(s, string.Empty);
                if (_deviceId.Substring(0, 1) == "=") {
                    _deviceId = "x" + _deviceId;
                }
            }

            GetAdAssemblyVersion();
            RefreshIpInfo();

            _storageCredentials = new StorageCredentials(accountName, keyValue);
            _storageAccount = new CloudStorageAccount(_storageCredentials, false);
            _tableClient = _storageAccount.CreateCloudTableClient();

            EnsureTablesCreated();
        }
 public ActionResult Article(Guid id)
 {
     foreach (News item in newsManagement.news)
         if (item.Id == id)
             return View(item);
     return Redirect("/error");
 }
Exemple #27
1
 /// <summary>
 /// Initializes a new instance of the Task data contract class given its required properties.
 /// </summary>
 /// <param name="clickGuid">Click Guid</param>
 /// <param name="facilityGuid">Facility Guid</param>
 /// <param name="listingTypeGuid">Listing Type Guid</param>
 /// <param name="timeStamp">Time Stamp</param>
 public Click(Guid clickGuid, Guid facilityGuid, Guid listingTypeGuid, DateTime timeStamp)
 {
     _clickGuid = clickGuid;
     _facilityGuid = facilityGuid;
     _listingTypeGuid = listingTypeGuid;
     _timeStamp = timeStamp;
 }
Exemple #28
1
        /// <summary>
        /// Generates the manifest and metadata information file used by the .epub reader
        /// (content.opf). For more information, refer to <see cref="http://www.idpf.org/doc_library/epub/OPF_2.0.1_draft.htm#Section2.0"/> 
        /// </summary>
        /// <param name="projInfo">Project information</param>
        /// <param name="contentFolder">Content folder (.../OEBPS)</param>
        /// <param name="bookId">Unique identifier for the book we're generating.</param>
        public void CreateOpf(PublicationInformation projInfo, string contentFolder, Guid bookId)
        {
            XmlWriter opf = XmlWriter.Create(Common.PathCombine(contentFolder, "content.opf"));
            opf.WriteStartDocument();
            // package name
            opf.WriteStartElement("package", "http://www.idpf.org/2007/opf");

            opf.WriteAttributeString("version", "2.0");
            opf.WriteAttributeString("unique-identifier", "BookId");

            // metadata - items defined by the Dublin Core Metadata Initiative:
            Metadata(projInfo, bookId, opf);
            StartManifest(opf);
            if (_parent.EmbedFonts)
            {
                ManifestFontEmbed(opf);
            }
            string[] files = Directory.GetFiles(contentFolder);
            ManifestContent(opf, files, "epub2");
            Spine(opf, files);
            Guide(projInfo, opf, files, "epub2");
            opf.WriteEndElement(); // package
            opf.WriteEndDocument();
            opf.Close();
        }
Exemple #29
1
		private void EnsureDocumentEtagMatchInTransaction(string key, Guid? etag)
		{
			Api.JetSetCurrentIndex(session, DocumentsModifiedByTransactions, "by_key");
			Api.MakeKey(session, DocumentsModifiedByTransactions, key, Encoding.Unicode, MakeKeyGrbit.NewKey);
			Guid existingEtag;
			if (Api.TrySeek(session, DocumentsModifiedByTransactions, SeekGrbit.SeekEQ))
			{
				if (Api.RetrieveColumnAsBoolean(session, DocumentsModifiedByTransactions, tableColumnsCache.DocumentsModifiedByTransactionsColumns["delete_document"]) == true)
					return; // we ignore etags on deleted documents
				existingEtag = Api.RetrieveColumn(session, DocumentsModifiedByTransactions, tableColumnsCache.DocumentsModifiedByTransactionsColumns["etag"]).TransfromToGuidWithProperSorting();
			}
			else
			{
				existingEtag = Api.RetrieveColumn(session, Documents, tableColumnsCache.DocumentsColumns["etag"]).TransfromToGuidWithProperSorting();
			}
			if (existingEtag != etag && etag != null)
			{
				throw new ConcurrencyException("PUT attempted on document '" + key +
											   "' using a non current etag")
				{
					ActualETag = etag.Value,
					ExpectedETag = existingEtag
				};
			}
		}
Exemple #30
0
 private bool SitemapIdMustBeProvided(GetSitemapTreeRequest getPageRequest, System.Guid sitemapId)
 {
     return(sitemapId != Guid.Empty);
 }
        public Jinher.AMP.BTP.Deploy.CustomDTO.CommoditySearchResultDTO GetAllCommodities(System.Guid appId, string commodityCategory, string commodityName, int pageIndex, int pageSize)
        {
            //定义返回值
            Jinher.AMP.BTP.Deploy.CustomDTO.CommoditySearchResultDTO result;

            try
            {
                //调用代理方法
                result = base.Channel.GetAllCommodities(appId, commodityCategory, commodityName, pageIndex, pageSize);
            }
            catch
            {
                //抛异常
                throw;
            }
            finally
            {
                //关链接
                ChannelClose();
            }            //返回结果
            return(result);
        }
Exemple #32
0
 public Neptune.Web.KeystoneDataService.UserProfile GetUserProfileByUsername(System.Guid applicationGuid, string username)
 {
     return(base.Channel.GetUserProfileByUsername(applicationGuid, username));
 }
 /// <summary>
 /// Initializes a new instance of the ContainerEvent class.
 /// </summary>
 /// <param name="eventInstanceId">The identifier for the FabricEvent
 /// instance.</param>
 /// <param name="timeStamp">The time event was logged.</param>
 /// <param name="category">The Category of the Event.</param>
 /// <param name="hasCorrelatedEvents">Shows that there is existing
 /// related events available.</param>
 public ContainerEvent(System.Guid eventInstanceId, string category, DateTime timeStamp, bool?hasCorrelatedEvents = false)
     : base(eventInstanceId, timeStamp, category, hasCorrelatedEvents)
 {
 }
Exemple #34
0
 public Neptune.Web.KeystoneDataService.UserProfile GetUserProfile(System.Guid userIdentifier)
 {
     return(base.Channel.GetUserProfile(userIdentifier));
 }
Exemple #35
0
 public Neptune.Web.KeystoneDataService.Organization GetOrganization(System.Guid organizationIdentifier)
 {
     return(base.Channel.GetOrganization(organizationIdentifier));
 }
Exemple #36
0
 public Neptune.Web.KeystoneDataService.Organization[] GetOrganizations(System.Guid applicationGuid)
 {
     return(base.Channel.GetOrganizations(applicationGuid));
 }
        public Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO <System.Collections.Generic.List <Jinher.AMP.BTP.Deploy.CustomDTO.ComAttrDTO> > GetCommodityById(System.Guid appid, System.Collections.Generic.List <System.Guid> ids, int pageIndex, int pageSize)
        {
            //定义返回值
            Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO <System.Collections.Generic.List <Jinher.AMP.BTP.Deploy.CustomDTO.ComAttrDTO> > result;

            try
            {
                //调用代理方法
                result = base.Channel.GetCommodityById(appid, ids, pageIndex, pageSize);
            }
            catch
            {
                //抛异常
                throw;
            }
            finally
            {
                //关链接
                ChannelClose();
            }            //返回结果
            return(result);
        }
        public Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO <System.Collections.Generic.List <Jinher.AMP.BTP.Deploy.CustomDTO.ComAttrDTO> > GetAppIdCommodity(string name, System.Guid appId, decimal price, int pageIndex, int pageSize)
        {
            //定义返回值
            Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO <System.Collections.Generic.List <Jinher.AMP.BTP.Deploy.CustomDTO.ComAttrDTO> > result;

            try
            {
                //调用代理方法
                result = base.Channel.GetAppIdCommodity(name, appId, price, pageIndex, pageSize);
            }
            catch
            {
                //抛异常
                throw;
            }
            finally
            {
                //关链接
                ChannelClose();
            }            //返回结果
            return(result);
        }
        public System.Collections.Generic.List <Jinher.AMP.BTP.Deploy.MallApplyDTO> GetMallApplyByIds(System.Guid esAppId, System.Collections.Generic.List <System.Guid> appIds)
        {
            //定义返回值
            System.Collections.Generic.List <Jinher.AMP.BTP.Deploy.MallApplyDTO> result;

            try
            {
                //调用代理方法
                result = base.Channel.GetMallApplyByIds(esAppId, appIds);
            }
            catch
            {
                //抛异常
                throw;
            }
            finally
            {
                //关链接
                ChannelClose();
            }            //返回结果
            return(result);
        }
        public System.Collections.Generic.List <Jinher.AMP.BTP.Deploy.OrderItemDTO> GetOrderInfoByAppId(System.Guid AppId, string StarTime, string EndTime)
        {
            //定义返回值
            System.Collections.Generic.List <Jinher.AMP.BTP.Deploy.OrderItemDTO> result;

            try
            {
                //调用代理方法
                result = base.Channel.GetOrderInfoByAppId(AppId, StarTime, EndTime);
            }
            catch
            {
                //抛异常
                throw;
            }
            finally
            {
                //关链接
                ChannelClose();
            }            //返回结果
            return(result);
        }
        public System.Collections.Generic.List <Jinher.AMP.BTP.Deploy.CustomDTO.ComAttrDTO> GetCommodityByIds(System.Guid appid, System.Collections.Generic.List <System.Guid> ids)
        {
            //定义返回值
            System.Collections.Generic.List <Jinher.AMP.BTP.Deploy.CustomDTO.ComAttrDTO> result;

            try
            {
                //调用代理方法
                result = base.Channel.GetCommodityByIds(appid, ids);
            }
            catch
            {
                //抛异常
                throw;
            }
            finally
            {
                //关链接
                ChannelClose();
            }            //返回结果
            return(result);
        }
        public System.Collections.Generic.List <Jinher.AMP.BTP.Deploy.SupplierDTO> GetSupplierInfoList(System.Guid appId)
        {
            //定义返回值
            System.Collections.Generic.List <Jinher.AMP.BTP.Deploy.SupplierDTO> result;

            try
            {
                //调用代理方法
                result = base.Channel.GetSupplierInfoList(appId);
            }
            catch
            {
                //抛异常
                throw;
            }
            finally
            {
                //关链接
                ChannelClose();
            }            //返回结果
            return(result);
        }
Exemple #43
0
            public tpu_CondicionesDeComprasRow Addtpu_CondicionesDeComprasRow(string IdCondicionDeCompra, string Descripcion, long Orden, System.Decimal Recargo, bool Activo, System.DateTime FechaCreacion, long IdConexionCreacion, System.Byte[] UltimaModificacion, long IdConexionUltimaModificacion, long IdReservado, System.Guid RowId, long IdEmpresa, long DiasVencimiento)
            {
                tpu_CondicionesDeComprasRow rowtpu_CondicionesDeComprasRow = ((tpu_CondicionesDeComprasRow)(this.NewRow()));

                rowtpu_CondicionesDeComprasRow.ItemArray = new object[] {
                    IdCondicionDeCompra,
                    Descripcion,
                    Orden,
                    Recargo,
                    Activo,
                    FechaCreacion,
                    IdConexionCreacion,
                    UltimaModificacion,
                    IdConexionUltimaModificacion,
                    IdReservado,
                    RowId,
                    IdEmpresa,
                    DiasVencimiento
                };
                this.Rows.Add(rowtpu_CondicionesDeComprasRow);
                return(rowtpu_CondicionesDeComprasRow);
            }
Exemple #44
0
        // shows the form with default values for comboboxes and pickers
        // links:
        //  docLink: http://sql2x.org/documentationLink/f5685d96-a0bb-4f7b-beaa-b3d578c7cf28
        public void ShowAsAdd(System.Guid ferryId, decimal amount, System.Guid financialCurrencyId, System.Guid userId)
        {
            try {
                _contract                             = new CrudeServiceFerryContract();
                _isNew                                = true;
                _contract.FerryId                     = ferryId;
                _contract.Amount                      = amount;
                maskedTextBoxAmount.Text              = _contract.Amount.ToString();
                _contract.FinancialCurrencyId         = financialCurrencyId;
                financialCurrencyPicker.SelectedValue = _contract.FinancialCurrencyId;
                _contract.UserId                      = userId;
                userPicker.SelectedValue              = userId;
                _contract.DateTime                    = DateTime.UtcNow;
                dateTimePickerDateTime.Text           = _contract.DateTime.ToString();

                Show();
            } catch (Exception ex) {
                if (ex == null)
                {
                }
                else
                {
                    System.Diagnostics.Debugger.Break();
                }
            }
        }
Exemple #45
0
            public tpr_TiposAjustesRow Addtpr_TiposAjustesRow(long IdTipoAjuste, string Descripcion, System.Byte Operacion, bool Sistema, System.DateTime FechaCreacion, long IdConexionCreacion, System.Byte[] UltimaModificacion, long IdConexionUltimaModificacion, long IdReservado, System.Guid RowId, long IdSucursal, long IdEmpresa)
            {
                tpr_TiposAjustesRow rowtpr_TiposAjustesRow = ((tpr_TiposAjustesRow)(this.NewRow()));

                rowtpr_TiposAjustesRow.ItemArray = new object[] {
                    IdTipoAjuste,
                    Descripcion,
                    Operacion,
                    Sistema,
                    FechaCreacion,
                    IdConexionCreacion,
                    UltimaModificacion,
                    IdConexionUltimaModificacion,
                    IdReservado,
                    RowId,
                    IdSucursal,
                    IdEmpresa
                };
                this.Rows.Add(rowtpr_TiposAjustesRow);
                return(rowtpr_TiposAjustesRow);
            }
            public tsy_ClaseDocumentoRow Addtsy_ClaseDocumentoRow(long IdClaseDocumento, string Descripcion, System.DateTime FechaCreacion, long IdConexionCreacion, System.Byte[] UltimaModificacion, long IdConexionUltimaModificacion, long IdReservado, System.Guid RowId, long IdEmpresa)
            {
                tsy_ClaseDocumentoRow rowtsy_ClaseDocumentoRow = ((tsy_ClaseDocumentoRow)(this.NewRow()));

                rowtsy_ClaseDocumentoRow.ItemArray = new object[] {
                    IdClaseDocumento,
                    Descripcion,
                    FechaCreacion,
                    IdConexionCreacion,
                    UltimaModificacion,
                    IdConexionUltimaModificacion,
                    IdReservado,
                    RowId,
                    IdEmpresa
                };
                this.Rows.Add(rowtsy_ClaseDocumentoRow);
                return(rowtsy_ClaseDocumentoRow);
            }
Exemple #47
0
 /// <remarks/>
 public void getUserFeedAsync(oAuthTwitter OAuth, string TwitterScreenName, string TwitterUserId, System.Guid userId)
 {
     this.getUserFeedAsync(OAuth, TwitterScreenName, TwitterUserId, userId, null);
 }
Exemple #48
0
 /// <remarks/>
 public void getUserFeedAsync(oAuthTwitter OAuth, string TwitterScreenName, string TwitterUserId, System.Guid userId, object userState)
 {
     if ((this.getUserFeedOperationCompleted == null))
     {
         this.getUserFeedOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetUserFeedOperationCompleted);
     }
     this.InvokeAsync("getUserFeed", new object[] {
         OAuth,
         TwitterScreenName,
         TwitterUserId,
         userId
     }, this.getUserFeedOperationCompleted, userState);
 }
 public CourseGroupQualifierRuleValueATO(Int64 id, System.Guid gid, System.String link)
 {
     this.ID      = id;
     this.GID     = gid;
     this.APILink = link;
 }
Exemple #50
0
 public void getUserFeed(oAuthTwitter OAuth, string TwitterScreenName, string TwitterUserId, System.Guid userId)
 {
     this.Invoke("getUserFeed", new object[] {
         OAuth,
         TwitterScreenName,
         TwitterUserId,
         userId
     });
 }
Exemple #51
0
 partial void OnrowguidChanging(System.Guid value);
Exemple #52
0
 public void SetGuid(System.Guid _guid)
 {
     guid = _guid;
     CreateGuid();
 }
Exemple #53
0
 partial void OnappIdChanging(System.Guid value);
Exemple #54
0
        public GeometricElement(Transform @transform, Material @material, Representation @representation, bool @isElementDefinition, System.Guid @id, string @name)
            : base(id, name)
        {
            var validator = Validator.Instance.GetFirstValidatorForType <GeometricElement>();

            if (validator != null)
            {
                validator.PreConstruct(new object[] { @transform, @material, @representation, @isElementDefinition, @id, @name });
            }

            this.Transform           = @transform;
            this.Material            = @material;
            this.Representation      = @representation;
            this.IsElementDefinition = @isElementDefinition;

            if (validator != null)
            {
                validator.PostConstruct(this);
            }
        }
 public AkWwiseTreeViewItem()
 {
     objectGuid = System.Guid.Empty;
     objectType = WwiseObjectType.None;
     children   = new List <TreeViewItem>();
 }
Exemple #56
0
 partial void OnchannelIdChanging(System.Guid value);
 // delete a row in table based on primary key
 // links:
 //  docLink: http://sql2x.org/documentationLink/eb0597e0-8ea0-425c-88af-213a170bbd5e
 public void Delete(System.Guid externalSystemId)
 {
     CrudeExternalSystemData.Delete(externalSystemId);
 }
        // fetch all rows from table into new List of Contracts, filtered by any column
        // links:
        //  docLink: http://sql2x.org/documentationLink/ce01ef4a-5cd0-4e51-b211-9c0a15b791a0
        public List <CrudeExternalSystemContract> FetchWithFilter(System.Guid externalSystemId, string externalSystemCode, string externalSystemName, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeExternalSystemContract>();
            List <CrudeExternalSystemData> dataList = CrudeExternalSystemData.FetchWithFilter(
                externalSystemId: externalSystemId,
                externalSystemCode: externalSystemCode,
                externalSystemName: externalSystemName,
                userId: userId,
                dateTime: dateTime
                );

            foreach (CrudeExternalSystemData data in dataList)
            {
                var crudeExternalSystemContract = new CrudeExternalSystemContract();
                DataToContract(data, crudeExternalSystemContract);
                list.Add(crudeExternalSystemContract);
            }

            return(list);
        }
        public static bool FindDeviceFromGuid(System.Guid myGuid, out string[] devicePathName)
        {
            // Purpose    : Uses SetupDi API functions to retrieve the device path name of an
            //            : attached device that belongs to an interface class.
            // Accepts    : myGuid - an interface class GUID.
            //            : devicePathName - a pointer to an array of strings that will contain
            //            : the device path names of attached devices.
            // Returns    : True if at least one device is found, False if not.

            System.Collections.ArrayList DevicePaths = new System.Collections.ArrayList();
            bool DeviceFound = false;

            try
            {
                IntPtr DeviceInfoSet =
                    setupapi.SetupDiGetClassDevs(
                        ref myGuid,
                        null,
                        IntPtr.Zero,
                        (int)(setupapi.DIGF.PRESENT | setupapi.DIGF.DEVICEINTERFACE));

                Debug.WriteLine(Debugging.ResultOfAPICall("SetupDiClassDevs"));

                // The cbSize element of the MyDeviceInterfaceData structure must be set to
                // the structure's size in bytes. The size is 28 bytes.
                setupapi.SP_DEVICE_INTERFACE_DATA MyDeviceInterfaceData = new setupapi.SP_DEVICE_INTERFACE_DATA();
                MyDeviceInterfaceData.cbSize = Marshal.SizeOf(MyDeviceInterfaceData);

                while (setupapi.SetupDiEnumDeviceInterfaces(
                           DeviceInfoSet,
                           0,
                           ref myGuid,
                           (uint)DevicePaths.Count,
                           ref MyDeviceInterfaceData))
                {
                    Debug.WriteLine(Debugging.ResultOfAPICall("SetupDiEnumDeviceInterfaces"));
                    uint BufferSize = 0;

                    bool Success = setupapi.SetupDiGetDeviceInterfaceDetail(
                        DeviceInfoSet,
                        ref MyDeviceInterfaceData,
                        IntPtr.Zero, 0, ref BufferSize, IntPtr.Zero);

                    // Store the structure's size.
                    byte[] TempPath = new byte[BufferSize + 4 + 2];
                    BitConverter.GetBytes((int)5).CopyTo(TempPath, 0);
                    // Call SetupDiGetDeviceInterfaceDetail again.
                    // This time, pass a pointer to DetailDataBuffer

                    Success = setupapi.SetupDiGetDeviceInterfaceDetail(
                        DeviceInfoSet,
                        ref MyDeviceInterfaceData,
                        TempPath,
                        BufferSize,
                        ref BufferSize,
                        IntPtr.Zero);
                    Debug.WriteLine(Debugging.ResultOfAPICall("SetupDiGetDeviceInterfaceDetail"));

                    char[] TempChar = new char[BufferSize];
                    Array.Copy(TempPath, 3, TempChar, 0, BufferSize);
                    string SingledevicePathName = new string(TempChar);
                    DevicePaths.Add(SingledevicePathName);
                    DeviceFound = true;
                }

                setupapi.SetupDiDestroyDeviceInfoList(DeviceInfoSet);
                Debug.WriteLine(Debugging.ResultOfAPICall("SetupDiDestroyDeviceInfoList"));
            }
            catch (Exception ex)
            {
                HandleException(ModuleName + ":" + System.Reflection.MethodBase.GetCurrentMethod(), ex);
            }

            devicePathName = (string[])DevicePaths.ToArray(typeof(string));

            return(DeviceFound);
        }
Exemple #60
-1
 public ActionResult Edit(Guid id)
 {
     var service = new RestServiceClient<Cat_SkillModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
     var result = service.Get(_hrm_Hr_Service, "api/Cat_Skill/", id);
     return View(result);
 }