public PartnerType Update(PartnerType model)
        {
            var ret = _context.PartnerType.Update(model).Entity;

            _context.SaveChanges();
            return(ret);
        }
        public static PartnerType FromModel(this PartnerType viewmodel, PartnerPack model)
        {
            viewmodel.ID   = model.ID;
            viewmodel.Name = model.Name;

            return(viewmodel);
        }
Esempio n. 3
0
        public static string ToDisplayStringPartner(this PartnerType type)
        {
            switch (type)
            {
            case PartnerType.VIP:
                return(Localization.Host.Views.Home.PartnerType.VIP);

            case PartnerType.Gold:
                return(Localization.Host.Views.Home.PartnerType.Gold);

            case PartnerType.Silver:
                return(Localization.Host.Views.Home.PartnerType.Silver);

            case PartnerType.Bronze:
                return(Localization.Host.Views.Home.PartnerType.Bronze);

            case PartnerType.Raffle:
                return(Localization.Host.Views.Home.PartnerType.Raffle);

            case PartnerType.Info:
                return(Localization.Host.Views.Home.PartnerType.Info);

            case PartnerType.Speaker:
                return(Localization.Host.Views.Home.PartnerType.Speaker);

            case PartnerType.Tech:
                return(Localization.Host.Views.Home.PartnerType.Tech);

            case PartnerType.Workshop:
                return(Localization.Host.Views.Home.PartnerType.Workshop);

            default:
                return(string.Empty);
            }
        }
        //список партнеров, по стране
        public KeyValuePair<string, string>[] GetCountryPartners(int countryID, PartnerType type)
        {
            var selectQuery = "select p.inc, p.name, p.lname  from guestservice_UserProfile as us, partner as p where ";

            if (type == PartnerType.Provider)
                selectQuery += "us.providerId = p.inc ";
            else if (type == PartnerType.Agent)
                selectQuery += "us.partnerId = p.inc ";
            else
                selectQuery += "us.partnerId = p.inc or us.providerId = p.inc ";

            //фильтруем страну
            selectQuery += String.Format(" and p.town in (select inc from town where state in (select inc from state where inc = {0}))", countryID);

            //текущий язык
            DataSet set = DatabaseOperationProvider.Query(selectQuery, "partners", new { });

            var partners = new List<KeyValuePair<string, string>>();

            foreach (DataRow row in set.Tables["partners"].Rows)
            {
                var regionslug = StringsHelper.GenerateSlug(row["inc"].ToString());

                if (UrlLanguage.CurrentLanguage == "ru")
                    partners.Add(new KeyValuePair<string, string>(regionslug, row["name"].ToString()));
                else
                    partners.Add(new KeyValuePair<string, string>(regionslug, row["lname"].ToString()));
            }

            return partners.ToArray();
        }
Esempio n. 5
0
        public static string ToDisplayStringPartner(this PartnerType type)
        {
            switch (type)
            {
            case PartnerType.VIP:
                return("Генеральный партнер");

            case PartnerType.Gold:
                return("Золотой партнер");

            case PartnerType.Silver:
                return("Серебряный партнер");

            case PartnerType.Raffle:
                return("Партнер по призам");

            case PartnerType.Info:
                return("Информационный партнер");

            case PartnerType.Speaker:
                return("Партнер по докладчикам");

            case PartnerType.Tech:
                return("Технический партнер");

            default:
                return(string.Empty);
            }
        }
Esempio n. 6
0
        /// <summary>
        /// 合作伙伴注册
        /// </summary>
        /// <param name="openid">openid</param>
        /// <param name="comName">公司名称</param>
        /// <param name="type">类型(经销商,供应商)</param>
        /// <param name="realname">真实姓名</param>
        /// <param name="address">公司地址</param>
        /// <param name="comPhone">公司电话</param>
        /// <param name="email">电子邮件</param>
        /// <param name="salesmanId">对应的销售id</param>
        /// <param name="files">相关资质图片字符串,格式为文件 名称1 :mediaid; eg:经营许可证:000001;组织机构代码:000005;</param>
        /// <param name="discrictid">区域id</param>
        /// <param name="money">加盟资金</param>
        /// <param name="sex">性别</param>
        /// <returns></returns>
        public Partner ReginPartner(string openid, string comName, PartnerType type, string realname, string address, string comPhone, int?salesmanId, string email, string files, int?discrictid, Sex sex, string money)
        {
            var db  = new ModelContext();
            var usr = WechatHelper.CheckOpenid(openid);

            usr = WechatHelper.CheckUser(usr);
            if (usr.UserInfoId == null || usr.UserInfoId == 0 || usr.UserInfo == null)
            {
                return(null);
            }

            // 将用户信息中的姓名更新
            usr.UserInfo.Name = realname;

            var pat = new Partner
            {
                RealName     = realname,
                Address      = address,
                CompanyName  = comName,
                CreateDate   = DateTime.Now,
                UserId       = usr.UserInfoId,
                CompanyPhone = comPhone,
                Point        = 0,
                Type         = type,
                Email        = email,
                SalesmanId   = salesmanId,
                DistrictId   = discrictid,
                Status       = PartnerStatus.Apply,
                Sex          = sex,
                Money        = money,
            };

            db.PartnerSet.Add(pat);
            db.SaveChanges();
            db.WechatUserSet.Find(usr.WechatUserId).PartnerId = pat.PartnerId;
            db.SaveChanges();

            //下载文件
            var filestrList = files.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
            var fileDic     = new Dictionary <string, string>();

            foreach (var filestr in filestrList)
            {
                var fileinfo = filestr.Split(new char[] { ':' }, StringSplitOptions.RemoveEmptyEntries);
                if (fileinfo.Length == 2)
                {
                    fileDic.Add(fileinfo[0], fileinfo[1]);
                }
            }
            if (fileDic != null && fileDic.Count > 0)
            {
                WechatImageHelper.AddNewImageForPartner(fileDic, pat.PartnerId, openid);
            }

            LogHelper.AddLog("Regist as a patner.", pat.PartnerId.ToString(), openid);

            return(pat);
        }
 /// <summary>
 /// Initializes a new instance of the IntegrationAccountPartnerInner
 /// class.
 /// </summary>
 /// <param name="partnerType">The partner type. Possible values
 /// include: 'NotSpecified', 'B2B'</param>
 /// <param name="content">The partner content.</param>
 /// <param name="createdTime">The created time.</param>
 /// <param name="changedTime">The changed time.</param>
 /// <param name="metadata">The metadata.</param>
 public IntegrationAccountPartnerInner(PartnerType partnerType, PartnerContent content, string location = default(string), string id = default(string), string name = default(string), string type = default(string), IDictionary <string, string> tags = default(IDictionary <string, string>), System.DateTime?createdTime = default(System.DateTime?), System.DateTime?changedTime = default(System.DateTime?), object metadata = default(object))
     : base(location, id, name, type, tags)
 {
     PartnerType = partnerType;
     CreatedTime = createdTime;
     ChangedTime = changedTime;
     Metadata    = metadata;
     Content     = content;
     CustomInit();
 }
Esempio n. 8
0
 internal void Create(int objId, string name, PartnerType type, int parentId)
 {
     this.ResourceId = objId;
     this.Name       = name;
     this.Type       = type;
     this.AddEvent(new PartnerCreated(ResourceId, name, (int)type)
     {
         Id       = this.ID,
         ParentId = parentId
     });
 }
        internal static string ToSerializedValue(this PartnerType value)
        {
            switch (value)
            {
            case PartnerType.NotSpecified:
                return("NotSpecified");

            case PartnerType.B2B:
                return("B2B");
            }
            return(null);
        }
Esempio n. 10
0
 private InsertOrderInput GetValidOrderInput(PartnerType partnerType)
 {
     return(new InsertOrderInput()
     {
         CompanyId = 1,
         CompanyName = "CompanyName",
         PartnerId = partnerType,
         SubmittedBy = "Cuma Kılınç",
         TypeOfOrder = "TypeOfOrder",
         PaidProducts = new List <InsertCampaignProduct>(),
         WebSites = new List <InsertWebSiteProduct>()
     });
 }
Esempio n. 11
0
 private void frmTree_Load(object sender, EventArgs e)
 {
     __Table         = (_Table)this.Tag;
     lblCaption.Text = __Table.Description;
     __Table.SetField();
     __Table._Field.SetDataField("FK_PartnerTypeCode");
     ptPartnerType = (PartnerType)Convert.ToInt32(__Table._Field.DefaultValue);
     pCCL.SetButton(gbDetails, ttToolTip);
     pCCL.SetButton(tsToolStrip, __Table);
     pCCL.SetDataPanelView(gbDetails, ttToolTip, __Table);
     gbDetails.Tag = __Table;
     pCCL.SetControlEvent(gbDetails);
     SetDataSource();
     pCCL.SetDataGridView(dgvDataGridView, __Table);
 }
Esempio n. 12
0
        private Task <Partner> LoaderAsync(int objId, PartnerType type)
        {
            var key = this.Key(objId, type);

            var obj = this._tools.Cachor.Get(key, async() =>
            {
                var entity = await this._tools.Reader.GetRepositoryAsync <PartnerEntity>()
                             .SingleAsync(p => p.ResourceId == objId && p.Type == (int)type);
                if (entity is null)
                {
                    return(null);
                }

                Partner p = this._tools.Mapper.Map <Partner>(entity);
                return(p);
            });
        private System.Windows.Forms.Form StartForm()
        {
            RoboticsTutorial4Form form = new RoboticsTutorial4Form(_mainPort);

            Invoke(delegate()
            {
                PartnerType partner = FindPartner("Drive");
                Uri uri             = new Uri(partner.Service);
                form.Text           = string.Format(
                    Resources.Culture,
                    Resources.Title,
                    uri.AbsolutePath
                    );
            }
                   );

            return(form);
        }
Esempio n. 14
0
        private System.Windows.Forms.Form StartForm()
        {
            //TODO: put form and logic to choose form at startup
            //LegoMazeDriverForm form = new LegoMazeDriverForm(_mainPort);
            LegoMazeAutomatedForm form = new LegoMazeAutomatedForm(_mainPort);

            Invoke(delegate()
            {
                PartnerType partner = FindPartner("Drive");
                Uri uri             = new Uri(partner.Service);
                form.Text           = string.Format(
                    Resources.Culture,
                    Resources.Title,
                    uri.AbsolutePath
                    );
            }
                   );

            return(form);
        }
Esempio n. 15
0
        private IEnumerator <ITask> OnStartup()
        {
            rst4.Get get;
            yield return(_clockPort.Get(GetRequestType.Instance, out get));

            rst4.ServiceTutorial4State state = get.ResponsePort;
            if (state == null)
            {
                LogError("Unable to Get state from ServiceTutorial4", (Fault)get.ResponsePort);
            }
            #endregion

            #region CODECLIP 01-4
            else // if (state != null)
            {
                ServiceTutorial6State initState = new ServiceTutorial6State();
                initState.InitialTicks = state.Ticks;

                PartnerType partner = FindPartner("Clock");
                if (partner != null)
                {
                    initState.Clock = partner.Service;
                }

                Replace replace = new Replace();
                replace.Body = initState;

                _mainPort.Post(replace);
            }
            #endregion

            #region CODECLIP 01-5
            rst4.Subscribe subscribe;
            yield return(_clockPort.Subscribe(_clockNotify, out subscribe));

            Fault fault = subscribe.ResponsePort;
            if (fault != null)
            {
                LogError("Unable to subscribe to ServiceTutorial4", fault);
            }
        }
Esempio n. 16
0
        void SubscribeForEntity()
        {
            // our entity instance name is passed as a partner
            PartnerType entityPartner = Dss.ServiceModel.DsspServiceBase.DsspServiceBase.FindPartner(
                new System.Xml.XmlQualifiedName(Microsoft.Robotics.Simulation.Partners.Entity, Microsoft.Robotics.Simulation.Contract.Identifier),
                ServiceInfo.PartnerList);

            if (entityPartner == null)
            {
                LogError("Invalid entity name specified as a partner to the iRobotLite Service");
            }
            else
            {
                // PartnerType.Service is the entity instance name.
                simengine.EntitySubscribeRequestType esrt = new simengine.EntitySubscribeRequestType();

                esrt.Name       = new Uri(entityPartner.Service).LocalPath.TrimStart('/');
                esrt.Subscriber = ServiceInfo.Service;
                _simEngine.Subscribe(esrt, _notificationTarget);
            }
        }
Esempio n. 17
0
        public override Int32 GetPartnerCode(PartnerType ptPartnerType)
        {
            try
            {
                var obj = pDAL.ExecuteScalar("SELECT MAX(PK_PartnerCode) + 1 PartnerCode FROM m_Partner WHERE FK_PartnerTypeCode = " + (int)ptPartnerType);
                if (obj.ToString().Equals(String.Empty))
                {
                    switch (ptPartnerType)
                    {
                    case PartnerType.ptEmployee: return(11);

                    case PartnerType.ptSupplier: return(1001);

                    case PartnerType.ptCustomer: return(10001);
                    }
                }
                return(Convert.ToInt32(obj));
            }
            catch
            {
                return(-1);
            }
        }
Esempio n. 18
0
        /// <summary>
        /// Service start
        /// </summary>
        protected override void Start()
        {
            base.Start();

            //_serverNotificationPort = ServiceForwarder<server.Sim2DSvrOperations>(_strServerUri);

            // combine with our main coordination
            MainPortInterleave.CombineWith(
                Arbiter.Interleave(
                    new TeardownReceiverGroup(),
                    new ExclusiveReceiverGroup(
                        Arbiter.Receive <FromClientUiMsg>(true, _fromClientUiPort, OnClientUiMessageHandler)
                        ),
                    new ConcurrentReceiverGroup(
                        Arbiter.Receive <server.CompetitionTypeChanged>(true, _serverNotificationNotify, NotifyCompetitionTypeHandler),
                        Arbiter.Receive <server.CompetitionControlButton>(true, _serverNotificationNotify, CompetitionControlButtonNotificationHandler),
                        Arbiter.Receive <server.MissionPara>(true, _serverNotificationNotify, MissionParaNotificationHandler),
                        Arbiter.Receive <client.HeartBeat>(true, _clientBasePort, HeartBeatAnnounceHandler),
                        Arbiter.Receive <client.TeamIdChanged>(true, _clientBasePort, TeamIdChangedAnnounceHandler)
                        )
                    )
                );

            WinFormsServicePort.Post(new RunForm(CreateForm)); // 显示客户端界面

            // 从Manifest文件获取Server服务实例的Uri
            PartnerType partnerTypeServer = FindPartner("Server");

            if (partnerTypeServer != null)
            {
                _strServerUri           = partnerTypeServer.Service;
                _serverNotificationPort = ServiceForwarder <server.Sim2DSvrOperations>(_strServerUri);
            }

            //server.Subscribe subscribe;
            //_serverNotificationPort.Subscribe(_serverNotificationNotify, out subscribe);
        }
Esempio n. 19
0
 public Partner(string partnerId, PartnerType partnerType)
 {
     PartnerId   = partnerId;
     PartnerType = partnerType;
 }
Esempio n. 20
0
 public abstract Int32 GetPartnerCode(PartnerType ptPartnerType);
Esempio n. 21
0
 public Int32 GetPartnerCode(PartnerType ptPartnerType)
 {
     return(pBRL.GetPartnerCode(ptPartnerType));
 }
Esempio n. 22
0
        public void InsertOrder_PartnerAandCWithoutAdditionalInfo_CustomExceptionMessage_PartnerAandCHaveAdditionalInfo(PartnerType partnerType)
        {
            //Arrange
            var orderService = GetOrderService();
            var orderInput   = GetValidOrderInput(partnerType);

            //Act and Assert
            Assert.Throws <CustomException>(() => orderService.InsertOrder(orderInput), OrderConstants.PartnerAandCHaveAdditionalInfo);
        }
 /// <summary>
 /// Initializes a new instance of the
 /// IntegrationAccountPartnerFilterInner class.
 /// </summary>
 /// <param name="partnerType">The partner type of integration account
 /// partner. Possible values include: 'NotSpecified', 'B2B'</param>
 public IntegrationAccountPartnerFilterInner(PartnerType partnerType)
 {
     PartnerType = partnerType;
     CustomInit();
 }
Esempio n. 24
0
 public void SetPartnerType(PartnerType partnerTypeMapped)
 {
     _dbContext.PartnerType.Add(partnerTypeMapped);
 }
Esempio n. 25
0
        // Retain
        private new Rect GenericLayoutParents(int x, int y, SimTreeInfo simA, SimTreeInfo simB, bool fromHalf, bool toHalf)
        {
            if (simA != null)
            {
                if (simA.mWin == null)
                {
                    simA.mWin          = CreateFamilyTreeThumb(simA.mSimDescription, new Vector2((float)x, (float)y));
                    simA.mBottomBounds = simA.mWin.Area;
                }

                x = (int)simA.mWin.Area.BottomRight.x;
            }

            if (simB != null)
            {
                x += (int)X_DIST_BETWEEN_THUMBS;
                if (simB.mWin == null)
                {
                    simB.mWin          = CreateFamilyTreeThumb(simB.mSimDescription, new Vector2((float)x, (float)y));
                    simB.mBottomBounds = simB.mWin.Area;
                }

                x = (int)simB.mWin.Area.BottomRight.x;
            }

            PartnerType partnerType = GetPartnerType(simA, simB);

            // Changed
            if ((simA == null) || (simB == null) || (partnerType == PartnerType.None))
            {
                if ((simA != null) && (simB != null))
                {
                    return(Rect.Union(simA.mWin.Area, simB.mWin.Area));
                }
                else if (simA != null)
                {
                    return(simA.mWin.Area);
                }
                else if (simB != null)
                {
                    return(simB.mWin.Area);
                }
                else
                {
                    return(new Rect((float)x, (float)y, (float)x, (float)y));
                }
            }
            else
            {
                Color barColor = new Color(0xff367cdd);
                switch (partnerType)
                {
                case PartnerType.Fiance:
                    barColor = new Color(0xffebd03e);
                    break;

                case PartnerType.BGFriend:
                    barColor = new Color(0xffdb4dc5);
                    break;
                }

                Rect b = Rect.Union(Rect.Union(ConnectSims(simA, simB, false, fromHalf, toHalf, barColor), simA.mWin.Area), simB.mWin.Area);
                simA.mBottomBounds = Rect.Union(simA.mBottomBounds, b);
                simB.mBottomBounds = Rect.Union(simB.mBottomBounds, b);

                return(b);
            }
        }
Esempio n. 26
0
        /// <summary>
        /// This handler receives an announcement from the simulation engine that
        /// contains a pointer to the entity associated with this service.
        /// </summary>
        /// <param name="ins"></param>
        void InsertEntityNotificationHandlerFirstTime(simengine.InsertSimulationEntity ins)
        {
            _entity = (simengine.IRobotCreate)ins.Body;
            _entity.ServiceContract = Contract.Identifier;
            _contactPort            = new Port <simcommon.EntityContactNotification>();
            // add the contact handler
            MainPortInterleave.CombineWith(new Interleave(
                                               new TeardownReceiverGroup(
                                                   ),
                                               new ExclusiveReceiverGroup
                                               (
                                               ),
                                               new ConcurrentReceiverGroup
                                               (
                                                   Arbiter.Receive <simcommon.EntityContactNotification>(true, _contactPort, ContactHandler)
                                               )
                                               ));

            _entity.Subscribe(_contactPort);

            PartnerType irEntityPartner = Dss.ServiceModel.DsspServiceBase.DsspServiceBase.FindPartner(
                new System.Xml.XmlQualifiedName("IREntity", Contract.Identifier), ServiceInfo.PartnerList);


            // only add an IR Entity if one was requested
            if (irEntityPartner != null)
            {
                // add an IR sensor, if necessary
                _irEntity = null;
                foreach (simengine.VisualEntity child in _entity.Children)
                {
                    if (child.GetType() == typeof(IREntity))
                    {
                        _irEntity = (IREntity)child;
                    }
                }

                if (_irEntity == null)
                {
                    // didn't find on already there so add one

                    // irentity is on the right front quadrant of the Create facing to the right
                    _irEntity = new IREntity(_entity.State.Name + "_IR", new Pose(
                                                 new Vector3(0.115f, 0.055f, -0.115f),
                                                 simengine.TypeConversion.FromXNA(xna.Quaternion.CreateFromAxisAngle(new xna.Vector3(0, 1, 0), (float)(Math.PI / 2)))));
                    _entity.InsertEntity(_irEntity);
                    // refresh the whole entity
                    System.Reflection.MethodInfo mInfo = typeof(simengine.SimulationEngine).GetMethod("RefreshEntity",
                                                                                                      System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public);
                    if (mInfo != null)
                    {
                        mInfo.Invoke(simengine.SimulationEngine.GlobalInstance, new object[] { _entity });
                    }
                }
            }

            // start up the polling timer
            int timerInterval = (_state.PollingInterval <= 0) ? 200 : _state.PollingInterval;

            if ((timerInterval > 0 && timerInterval < 200))
            {
                timerInterval = 200;
            }

            StartTimer(timerInterval);
            // create default state based on the physics entity
            //_state.DistanceBetweenWheels = _entity.ChassisShape.BoxState.Dimensions.X;
            //_state.LeftWheel.MotorState.PowerScalingFactor = _entity.MotorTorqueScaling;
            //_state.RightWheel.MotorState.PowerScalingFactor = _entity.MotorTorqueScaling;
        }
Esempio n. 27
0
        IEnumerator <ITask> InitializeCamera()
        {
            ServiceInfoType info  = null;
            Fault           fault = null;

            yield return(Arbiter.Choice(
                             _blobTrackerPort.DsspDefaultLookup(),
                             delegate(LookupResponse success)
            {
                info = success;
            },
                             delegate(Fault f)
            {
                fault = f;
            }
                             ));

            if (fault != null)
            {
                LogError(null, "Lookup failed on BlobTracker partner", fault);
                yield break;
            }

            PartnerType camera = FindPartner(
                new XmlQualifiedName("WebCam", bt.Contract.Identifier),
                info.PartnerList
                );

            if (camera == null ||
                string.IsNullOrEmpty(camera.Service))
            {
                LogError("No camera partner found for BlobTracker");
                yield break;
            }

            _webCamPort = ServiceForwarder <cam.WebCamOperations>(camera.Service);

            yield return(Arbiter.Choice(
                             _webCamPort.Subscribe(_webCamNotify, typeof(cam.UpdateFrame)),
                             delegate(SubscribeResponseType success) { },
                             delegate(Fault f)
            {
                fault = f;
            }
                             ));

            if (fault != null)
            {
                LogError(null, "Failed to subscribe to webcam", fault);
                yield break;
            }

            yield return(Arbiter.Choice(
                             _blobTrackerPort.Subscribe(_blobTrackerNotify),
                             delegate(SubscribeResponseType success) { },
                             delegate(Fault f)
            {
                fault = f;
            }
                             ));

            if (fault != null)
            {
                LogError(null, "Failed to subscribe to blob tracker", fault);
                yield break;
            }

            RunForm runForm = new RunForm(CreateVisualization);

            WinFormsServicePort.Post(runForm);

            yield return(Arbiter.Choice(
                             runForm.pResult,
                             delegate(SuccessResult success) { },
                             delegate(Exception e)
            {
                fault = Fault.FromException(e);
            }
                             ));

            if (fault != null)
            {
                LogError(null, "Failed to Create Visualization window", fault);
                yield break;
            }

            base.MainPortInterleave.CombineWith(
                Arbiter.Interleave(
                    new TeardownReceiverGroup(),
                    new ExclusiveReceiverGroup(
                        Arbiter.Receive <cam.UpdateFrame>(true, _webCamNotify, CameraUpdateFrameHandler),
                        Arbiter.Receive <bt.ImageProcessed>(true, _blobTrackerNotify, BlobTrackerImageProcessedHandler),
                        Arbiter.Receive <Shutdown>(true, _shutdownPort, ShutdownHandler)
                        ),
                    new ConcurrentReceiverGroup(
                        Arbiter.Receive <bt.DeleteBin>(true, _blobTrackerNotify, EmptyHandler),
                        Arbiter.Receive <bt.InsertBin>(true, _blobTrackerNotify, EmptyHandler),
                        Arbiter.Receive <bt.UpdateBin>(true, _blobTrackerNotify, EmptyHandler)
                        )
                    )
                );
        }
        public Partner(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "id":
                    this._Id = ParseInt(propertyNode.InnerText);
                    continue;

                case "name":
                    this._Name = propertyNode.InnerText;
                    continue;

                case "website":
                    this._Website = propertyNode.InnerText;
                    continue;

                case "notificationUrl":
                    this._NotificationUrl = propertyNode.InnerText;
                    continue;

                case "appearInSearch":
                    this._AppearInSearch = ParseInt(propertyNode.InnerText);
                    continue;

                case "createdAt":
                    this._CreatedAt = ParseInt(propertyNode.InnerText);
                    continue;

                case "adminName":
                    this._AdminName = propertyNode.InnerText;
                    continue;

                case "adminEmail":
                    this._AdminEmail = propertyNode.InnerText;
                    continue;

                case "description":
                    this._Description = propertyNode.InnerText;
                    continue;

                case "commercialUse":
                    this._CommercialUse = (CommercialUseType)ParseEnum(typeof(CommercialUseType), propertyNode.InnerText);
                    continue;

                case "landingPage":
                    this._LandingPage = propertyNode.InnerText;
                    continue;

                case "userLandingPage":
                    this._UserLandingPage = propertyNode.InnerText;
                    continue;

                case "contentCategories":
                    this._ContentCategories = propertyNode.InnerText;
                    continue;

                case "type":
                    this._Type = (PartnerType)ParseEnum(typeof(PartnerType), propertyNode.InnerText);
                    continue;

                case "phone":
                    this._Phone = propertyNode.InnerText;
                    continue;

                case "describeYourself":
                    this._DescribeYourself = propertyNode.InnerText;
                    continue;

                case "adultContent":
                    this._AdultContent = ParseBool(propertyNode.InnerText);
                    continue;

                case "defConversionProfileType":
                    this._DefConversionProfileType = propertyNode.InnerText;
                    continue;

                case "notify":
                    this._Notify = ParseInt(propertyNode.InnerText);
                    continue;

                case "status":
                    this._Status = (PartnerStatus)ParseEnum(typeof(PartnerStatus), propertyNode.InnerText);
                    continue;

                case "allowQuickEdit":
                    this._AllowQuickEdit = ParseInt(propertyNode.InnerText);
                    continue;

                case "mergeEntryLists":
                    this._MergeEntryLists = ParseInt(propertyNode.InnerText);
                    continue;

                case "notificationsConfig":
                    this._NotificationsConfig = propertyNode.InnerText;
                    continue;

                case "maxUploadSize":
                    this._MaxUploadSize = ParseInt(propertyNode.InnerText);
                    continue;

                case "partnerPackage":
                    this._PartnerPackage = ParseInt(propertyNode.InnerText);
                    continue;

                case "secret":
                    this._Secret = propertyNode.InnerText;
                    continue;

                case "adminSecret":
                    this._AdminSecret = propertyNode.InnerText;
                    continue;

                case "cmsPassword":
                    this._CmsPassword = propertyNode.InnerText;
                    continue;

                case "allowMultiNotification":
                    this._AllowMultiNotification = ParseInt(propertyNode.InnerText);
                    continue;

                case "adminLoginUsersQuota":
                    this._AdminLoginUsersQuota = ParseInt(propertyNode.InnerText);
                    continue;

                case "adminUserId":
                    this._AdminUserId = propertyNode.InnerText;
                    continue;

                case "firstName":
                    this._FirstName = propertyNode.InnerText;
                    continue;

                case "lastName":
                    this._LastName = propertyNode.InnerText;
                    continue;

                case "country":
                    this._Country = propertyNode.InnerText;
                    continue;

                case "state":
                    this._State = propertyNode.InnerText;
                    continue;

                case "additionalParams":
                    this._AdditionalParams = new List <KeyValue>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._AdditionalParams.Add(ObjectFactory.Create <KeyValue>(arrayNode));
                    }
                    continue;

                case "publishersQuota":
                    this._PublishersQuota = ParseInt(propertyNode.InnerText);
                    continue;

                case "partnerGroupType":
                    this._PartnerGroupType = (PartnerGroupType)ParseEnum(typeof(PartnerGroupType), propertyNode.InnerText);
                    continue;

                case "defaultEntitlementEnforcement":
                    this._DefaultEntitlementEnforcement = ParseBool(propertyNode.InnerText);
                    continue;

                case "defaultDeliveryType":
                    this._DefaultDeliveryType = propertyNode.InnerText;
                    continue;

                case "defaultEmbedCodeType":
                    this._DefaultEmbedCodeType = propertyNode.InnerText;
                    continue;

                case "deliveryTypes":
                    this._DeliveryTypes = new List <PlayerDeliveryType>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._DeliveryTypes.Add(ObjectFactory.Create <PlayerDeliveryType>(arrayNode));
                    }
                    continue;

                case "embedCodeTypes":
                    this._EmbedCodeTypes = new List <PlayerEmbedCodeType>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._EmbedCodeTypes.Add(ObjectFactory.Create <PlayerEmbedCodeType>(arrayNode));
                    }
                    continue;

                case "templatePartnerId":
                    this._TemplatePartnerId = ParseInt(propertyNode.InnerText);
                    continue;

                case "ignoreSeoLinks":
                    this._IgnoreSeoLinks = ParseBool(propertyNode.InnerText);
                    continue;

                case "host":
                    this._Host = propertyNode.InnerText;
                    continue;

                case "cdnHost":
                    this._CdnHost = propertyNode.InnerText;
                    continue;

                case "isFirstLogin":
                    this._IsFirstLogin = ParseBool(propertyNode.InnerText);
                    continue;

                case "logoutUrl":
                    this._LogoutUrl = propertyNode.InnerText;
                    continue;

                case "partnerParentId":
                    this._PartnerParentId = ParseInt(propertyNode.InnerText);
                    continue;

                case "crmId":
                    this._CrmId = propertyNode.InnerText;
                    continue;

                case "referenceId":
                    this._ReferenceId = propertyNode.InnerText;
                    continue;

                case "timeAlignedRenditions":
                    this._TimeAlignedRenditions = ParseBool(propertyNode.InnerText);
                    continue;

                case "eSearchLanguages":
                    this._ESearchLanguages = new List <ESearchLanguageItem>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._ESearchLanguages.Add(ObjectFactory.Create <ESearchLanguageItem>(arrayNode));
                    }
                    continue;

                case "publisherEnvironmentType":
                    this._PublisherEnvironmentType = ParseInt(propertyNode.InnerText);
                    continue;

                case "ovpEnvironmentUrl":
                    this._OvpEnvironmentUrl = propertyNode.InnerText;
                    continue;

                case "ottEnvironmentUrl":
                    this._OttEnvironmentUrl = propertyNode.InnerText;
                    continue;
                }
            }
        }
Esempio n. 29
0
 public IEnumerable <Partner> GetPartnersByType(PartnerType partnerType)
 {
     return(_partners
            .Where(x => x.PartnerType.HasFlag(partnerType))
            .OrderBy(x => x.Id));
 }
Esempio n. 30
0
 private string Key(int objId, PartnerType type) => String.Concat(this._tools.Options.Value.PartnerCachePrefix, objId, "_", (int)type);
Esempio n. 31
0
 public IEnumerable <PartnerEntity> GetPartnersByType(PartnerType partnerType)
 {
     return(Storage
            .Where(x => x.PartnerType.HasFlag(partnerType))
            .OrderBy(x => x.Id));
 }