예제 #1
0
    public new object Clone()
    {
        EventAPI api = new EventAPI();

        api.DBID       = this.DBID;
        api.ReturnType = this.ReturnType;
        api.strText    = this.strText;
        api.combText   = this.combText;
        api.ArgList    = this.ArgList;
        api.Parent     = this.Parent;
        if (this.ArgList != null)
        {
            for (int i = 0; i < this.ArgList.Length; i++)
            {
                if (i >= this.ArgValues.Count || this.ArgValues[i] == null)
                {
                    api.ArgValues.Add(null);
                }
                else
                {
                    api.ArgValues.Add(this.ArgValues[i].Clone() as Exp);
                }
            }
        }
        return(api);
    }
예제 #2
0
        bool InterfaceEvent.AddEvent(Event @event)
        {
            EventAPI eventAPI = new EventAPI();

            eventAPI.AddEvent(@event);
            return(true);
        }
예제 #3
0
 private void radioButtonCustom_CheckedChanged(object sender, EventArgs e)
 {
     expControl1.Enabled = radioButtonCustom.Checked;
     if (radioButtonCustom.Checked)
     {
         if (comboBox1.Items_SelectedItem == null)
         {
             return;
         }
         GameEvent selEvent = this.comboBox1.Items_SelectedItem as GameEvent;
         expControl1.SetComboText(selEvent);
     }
     else
     {
         //去掉自定义信息
         EventAPI api = null;
         if (this.comboBox1.Items_SelectedItem != null)
         {
             api = (this.comboBox1.Items_SelectedItem as GameEvent).GetEventAPI();
             for (int i = 0; i < api.ArgList.Length; i++)
             {
                 api.ArgValues[i] = null;
             }
         }
     }
 }
        // return core info about this event
        public async Task <EventAPI> Info()
        {
            EventAPI info = new EventAPI();

            info.id     = this.GetPrimaryKeyString(); // make sure we return this grain key as event id
            info.title  = State.title;
            info.type   = State.type;
            info.start  = State.start;
            info.end    = State.end;
            info.topics = State.topics;

            return(info);
        }
예제 #5
0
        private void EventListForm_Load(object sender, EventArgs e)
        {
            GameEvent[] events = ExpManager.GetGameEventList();

            //用带数据的事件替换事件列表中的事件
            for (int i = 0; i < events.Length; i++)
            {
                if (selectedEvent != null && events[i].DBID == selectedEvent.DBID)
                {
                    events[i] = selectedEvent.Clone() as GameEvent;
                    break;
                }
            }

            this.comboBox1.Items_AddRange(events);

            //自动选中
            foreach (GameEvent i_event in comboBox1.Items_All)
            {
                if (selectedEvent != null && i_event != null && selectedEvent.DBID == i_event.DBID)
                {
                    comboBox1.Items_SelectedItem = i_event;
                    break;
                }
            }
            if (comboBox1.Items_SelectedItem == null && comboBox1.Items_Count > 0)
            {
                comboBox1.Items_SelectedItem = comboBox1.Items_All[0];
            }

            //自动选中全部/指定
            GameEvent selEvent = this.comboBox1.Items_SelectedItem as GameEvent;

            if (selEvent != null)
            {
                EventAPI api    = selEvent.GetEventAPI();
                bool     isNull = false;
                for (int i = 0; i < api.ArgValues.Count; i++)
                {
                    if (api.ArgValues[i] != null)
                    {
                        isNull = true;
                    }
                }
                if (isNull)
                {
                    this.radioButtonCustom.Checked = true;
                }
            }
        }
예제 #6
0
        public async Task <EventAPI> Get(string id)
        {
            logger.LogInformation($"GET api/events/id: id = {id}");

            // call grain
            EventAPI info = new EventAPI();

            await ConnectClientIfNeeded();

            var grain = this.client.GetGrain <IEventGrain>(id);

            info = await grain.Info();

            return(info);
        }
예제 #7
0
파일: EventGrain.cs 프로젝트: zer0big/smilr
        // return core info about this event
        public async Task <EventAPI> Info()
        {
            Console.WriteLine($"** Event Grain Info()for topicId = {this.GetPrimaryKeyString()}");

            EventAPI info = new EventAPI();

            info._id    = this.GetPrimaryKeyString(); // make sure we return the grain key as event id
            info.title  = State.title;
            info.type   = State.type;
            info.start  = State.start;
            info.end    = State.end;
            info.topics = State.topics;

            return(info);
        }
예제 #8
0
        public async Task <EventAPI> Post([FromBody] EventAPI body)
        {
            // create new event code, which we tend to keep short to be more memorable
            string eventCode = makeId(6);

            logger.LogInformation($"POST /api/events: Create new event, incoming body title = {body.title}, assigned to event code {eventCode}");

            // initialise grain with event info
            await ConnectClientIfNeeded();

            var grain = this.client.GetGrain <IEventGrain>(eventCode);
            await grain.Update(body.title, body.type, body.start, body.end, body.topics);

            // return body with event code added
            body._id = eventCode;
            return(body);
        }
예제 #9
0
        private void btnClearEvtlog_Click(object sender, EventArgs e)
        {
            if (_plugin == null)
            {
                return;
            }

            UInt32 ret;

            string sMsg = string.Format("Are you sure do you want to clear the EventLog database?\n" +
                                        "\ni. Select on 'Yes' will clear the entire EventLog database." +
                                        "\nii. Select on 'No' clears all the records of the Log {0}", _parentPage.TreeNode.Text);

            DialogResult dlg = MessageBox.Show(this,
                                               sMsg,
                                               CommonResources.GetString("Caption_Console"),
                                               MessageBoxButtons.YesNoCancel,
                                               MessageBoxIcon.Question,
                                               MessageBoxDefaultButton.Button3);

            if (dlg == DialogResult.Yes)
            {
                ret = EventAPI.ClearEventLog(this._plugin.eventLogHandle.Handle);
                if (ret != 0)
                {
                    Logger.Log(string.Format("Unable to clear the events log database"));
                    return;
                }
                ClearListView();
            }
            else if (dlg == DialogResult.No)
            {
                ret = EventAPI.DeleteFromEventLog(this._plugin.eventLogHandle.Handle, string.Format("(EventTableCategoryId = '{0}')", _parentPage.TreeNode.Text));
                if (ret != 0)
                {
                    Logger.Log(string.Format("Unable to delete the events for the current log {0}", _parentPage.TreeNode.Text));
                    return;
                }
                ClearListView();
            }
            else
            {
                return;
            }
        }
예제 #10
0
        public EventAPI GetEventAPI()
        {
            if (this.m_eventAPI != null)
            {
                return(this.m_eventAPI);
            }
            EventAPI api = new EventAPI();

            api.DBID      = this.DBID;
            api.Parent    = this;
            api.combText  = this.combText;
            api.ArgList   = this.ArgList;
            api.ArgValues = new List <Exp>();
            for (int i = 0; i < api.ArgList.Length; i++)
            {
                api.ArgValues.Add(null);
            }
            return(api);
        }
예제 #11
0
        public async Task <EventAPI> Put([FromBody] EventAPI body, string eventCode)
        {
            logger.LogInformation($"PUT /api/events: Update existing event, event code = {eventCode}, body title = {body.title}");

            //string eventCode = body._id;
            if (eventCode == "")
            {
                Response.StatusCode = 204;
                return(body);
            }

            // update grain
            await ConnectClientIfNeeded();

            var grain = this.client.GetGrain <IEventGrain>(eventCode);
            await grain.Update(body.title, body.type, body.start, body.end, body.topics);

            body._id = eventCode; // make sure we include the event code back into the body
            return(body);
        }
예제 #12
0
        public async Task Put([FromBody] EventAPI body)
        {
            logger.LogInformation($"PUT /api/events: incoming body = {body}");

            string eventCode = body.id;

            if (eventCode == "")
            {
                Response.StatusCode = 204;
                return;
            }

            // update grain
            await ConnectClientIfNeeded();

            var grain = this.client.GetGrain <IEventGrain>(eventCode);
            await grain.Update(body.title, body.type, body.start, body.end, body.topics);

            return;
        }
        //converts Event to spGetAllSavedEventsForSpecificUser_Result
        public static Eventual.Model.EventAPI EventAPIEntityToEventAPIModel(spGetAllSavedEventsForSpecificUser_Result saved)
        {
            EventAPI eventAPI = null;

            if (saved != null)
            {
                eventAPI = new EventAPI
                {
                    EventID           = saved.EventID,
                    EventEndTime      = saved.EventEndTime,
                    EventStartTime    = saved.EventStartTime,
                    EventImageURL     = saved.EventImageURL,
                    EventPrice        = saved.EventPrice,
                    EventTitle        = saved.EventTitle,
                    LocationCity      = saved.LocationCity,
                    LocationStreet1   = saved.LocationStreet1,
                    StateAbbreviation = saved.StateAbbreviation,
                    UserID            = saved.UserID
                };
            }

            return(eventAPI);
        }
        //converts Event to spGetAllCurrentRegisteredEventsForSpecificUser_Result
        public static Eventual.Model.EventAPI EventAPIEntityToEventAPIModel(spGetAllPastRegisteredEventsForSpecificUser_Result past)
        {
            EventAPI eventAPI = null;

            if (past != null)
            {
                eventAPI = new EventAPI
                {
                    EventID           = past.EventID,
                    EventEndTime      = past.EventEndTime,
                    EventStartTime    = past.EventStartTime,
                    EventImageURL     = past.EventImageURL,
                    EventPrice        = past.EventPrice,
                    EventTitle        = past.EventTitle,
                    LocationCity      = past.LocationCity,
                    LocationStreet1   = past.LocationStreet1,
                    StateAbbreviation = past.StateAbbreviation,
                    UserID            = past.UserID
                };
            }

            return(eventAPI);
        }
예제 #15
0
 public override void Reload()
 {
     base.Reload();
     if (m_eventAPI == null)
     {
         m_eventAPI = GetEventAPI();
     }
     else
     {
         m_eventAPI.Parent   = this;
         m_eventAPI.combText = this.combText;
         m_eventAPI.ArgList  = this.ArgList;
         if (m_eventAPI.ArgValues.Count != m_eventAPI.ArgList.Length)
         {
             //重读后发现事件参数个数变化
             if (m_eventAPI.ArgValues.Count < m_eventAPI.ArgList.Length)
             {
                 for (int i = 0; i < m_eventAPI.ArgList.Length - m_eventAPI.ArgValues.Count; i++)
                 {
                     m_eventAPI.ArgValues.Add(null);
                 }
                 throw new Exception("事件" + this.ToString() + "的参数个数变多了。");
             }
             else
             {
                 throw new Exception("事件" + this.ToString() + "的参数个数变少。原流程图末尾的参数将被删除。");
             }
         }
         foreach (Exp exp in m_eventAPI.ArgValues)
         {
             if (exp != null)
             {
                 ExpManager.ReloadExp(exp);
             }
         }
     }
 }
예제 #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //create callback to get access token and request tokem
            LoginRadiusCallback callback = new LoginRadiusCallback();


            //If Request as LoginRadius callback, after user successfully loggedin on provider.
            if (callback.IsCallback)
            {
                //To get access token with the help of loginradius "api secret"
                var accessToken = callback.GetAccessToken(ConfigurationManager.AppSettings["apisecret"].ToString());

                //save token to session for further use
                Session["token"] = accessToken;

                try
                {
                    //create client with the help of access token as parameter
                    LoginRadiusClient client = new LoginRadiusClient(accessToken);

                    //create object to execute user profile api to get user profile data.
                    UserProfileAPI userprofile = new UserProfileAPI();

                    //To get ultimate user profile data with the help of user profile api object as parameter.
                    // and pass "LoginRadiusUltimateUserProfile" model as interface to map user profile data.
                    var userProfileData = client.GetResponse <LoginRadiusUltimateUserProfile>(userprofile);


                    if (userProfileData.Provider.ToLower() == "facebook" || userProfileData.Provider.ToLower() == "twitter" || userProfileData.Provider.ToLower() == "linkedin")
                    {
                        postmessage.Visible = true;
                    }
                    else
                    {
                        postmessage.Visible = false;
                    }
                    if (userProfileData.Provider.ToLower() == "twitter" || userProfileData.Provider.ToLower() == "linkedin")
                    {
                        directmessage.Visible = true;
                    }
                    else
                    {
                        directmessage.Visible = false;
                    }


                    name.Text = "<b>Full Name : </b>" + userProfileData.FullName;
                    if (userProfileData.Email != null)
                    {
                        emailid.Text = "<b>Email ID  : </b>" + userProfileData.Email[0].Value;
                    }
                    about.Text = "<b>About     : </b>" + userProfileData.About;
                    if (userProfileData.ImageUrl != null && userProfileData.ImageUrl != "")
                    {
                        userprofileimage.ImageUrl = userProfileData.ImageUrl;
                    }
                    else
                    {
                        userprofileimage.ImageUrl = "Content/images/no_image.png";
                    }

                    if (userProfileData.ID != null)
                    {
                        Truserid.Visible = true;
                    }
                    if (userProfileData.Gender != null)
                    {
                        Trgender.Visible = true;
                    }
                    if (userProfileData.Provider != null)
                    {
                        Trprovider.Visible = true;
                    }
                    if (userProfileData.ProfileName != null)
                    {
                        TrProfileName.Visible = true;
                    }
                    if (userProfileData.Age != null)
                    {
                        Trage.Visible = true;
                    }
                    if (userProfileData.Quota != null)
                    {
                        Trquota.Visible = true;
                    }
                    if (userProfileData.MainAddress != null)
                    {
                        TrMainAddress.Visible = true;
                    }
                    if (userProfileData.HomeTown != null)
                    {
                        TrHomeTown.Visible = true;
                    }
                    if (userProfileData.PhoneNumbers != null)
                    {
                        TrPhoneNumbers.Visible = true;
                    }
                    if (userProfileData.ProfileCountry != null)
                    {
                        TrProfileCountry.Visible = true;
                    }
                    if (userProfileData.ProfileUrl != null)
                    {
                        TrProfileUrl.Visible = true;
                    }
                    if (userProfileData.Religion != null)
                    {
                        TrReligion.Visible = true;
                    }
                    if (userProfileData.RelationshipStatus != null)
                    {
                        TrRelationshipStatus.Visible = true;
                    }
                    if (userProfileData.State != null)
                    {
                        TrState.Visible = true;
                    }
                    if (userProfileData.TimeZone != null)
                    {
                        Trtimezone.Visible = true;
                    }
                    if (userProfileData.LocalLanguage != null)
                    {
                        Trlocallanguage.Visible = true;
                    }
                    if (userProfileData.Website != null)
                    {
                        Trwebsite.Visible = true;
                    }
                    if (userProfileData.BirthDate != null)
                    {
                        Trdateofbirth.Visible = true;
                    }

                    gender.Text             = userProfileData.Gender;
                    age.Text                = userProfileData.Age;
                    dateofbirth.Text        = userProfileData.BirthDate;
                    website.Text            = userProfileData.Website;
                    locallanguage.Text      = userProfileData.LocalLanguage;
                    timezone.Text           = userProfileData.TimeZone;
                    State.Text              = userProfileData.State;
                    RelationshipStatus.Text = userProfileData.RelationshipStatus;
                    Religion.Text           = userProfileData.Religion;
                    ProfileCountry.Text     = userProfileData.ProfileCountry;
                    ProfileUrl.Text         = userProfileData.ProfileUrl;
                    HomeTown.Text           = userProfileData.HomeTown;
                    MainAddress.Text        = userProfileData.MainAddress;
                    userid.Text             = userProfileData.ID;
                    provider.Text           = userProfileData.Provider;
                    localcity.Text          = userProfileData.LocalCity;
                    localcountry.Text       = userProfileData.LocalCountry;
                    ProfileName.Text        = userProfileData.ProfileName;
                    quota.Text              = userProfileData.Quota;

                    if (userProfileData.Addresses != null)
                    {
                        address.Visible = true;
                    }
                    if (userProfileData.Positions != null)
                    {
                        position.Visible = true;
                    }
                    if (userProfileData.Educations != null)
                    {
                        educationss.Visible = true;
                    }
                    positions.DataSource = userProfileData.Positions;
                    positions.DataBind();
                    educations.DataSource = userProfileData.Educations;
                    educations.DataBind();
                    addresses.DataSource = userProfileData.Addresses;
                    addresses.DataBind();


                    //create object to execute album api to get albums
                    AlbumAPI albums = new AlbumAPI();

                    //To get albums data with the help of album api object as parameter.
                    // and pass "LoginRadiusAlbum" model as interface to map album data.
                    var userAlbums = client.GetResponse <List <LoginRadiusAlbum> >(albums);
                    Album.DataSource = userAlbums != null ? userAlbums : null;
                    Album.DataBind();

                    //create object to execute audio api to get audios
                    AudioAPI audios = new AudioAPI();

                    //To get audios data with the help of audio api object as parameter.
                    // and pass "LoginRadiusAudio" model as interface to map audio data.
                    var userAudios = client.GetResponse <List <LoginRadiusAudio> >(audios);
                    Audio.DataSource = userAudios != null ? userAudios : null;
                    Audio.DataBind();

                    //create object to execute checkin api to get checkins
                    CheckInAPI checkins = new CheckInAPI();

                    //To get checkins data with the help of checkin api object as parameter.
                    // and pass "LoginRadiusCheckIn" model as interface to map checkin data.
                    var userCheckins = client.GetResponse <List <LoginRadiusCheckIn> >(checkins);
                    CheckIn.DataSource = userCheckins != null ? userCheckins : null;
                    CheckIn.DataBind();

                    //create object to execute company api to get companies
                    CompanyAPI companies = new CompanyAPI();

                    //To get companies data with the help of company api object as parameter.
                    // and pass "LoginRadiusCompany" model as interface to map company data.
                    var userCompanies = client.GetResponse <List <LoginRadiusCompany> >(companies);
                    Company.DataSource = userCompanies != null ? userCompanies : null;
                    Company.DataBind();

                    //create object to execute contact api to get contacts
                    ContactAPI contacts = new ContactAPI();

                    //To get contacts data with the help of contact api object as parameter.
                    // and pass "LoginRadiusContact" model as interface to map contact data.
                    var userContacts = client.GetResponse <LoginRadiusCursorResponse <LoginRadiusContact> >(contacts);

                    Contact.DataSource = userContacts != null ? userContacts.Data : null;
                    Contact.DataBind();

                    //create object to execute event api to get events
                    EventAPI events = new EventAPI();

                    //To get events data with the help of event api object as parameter.
                    // and pass "LoginRadiusEvent" model as interface to map event data.
                    var userEvents = client.GetResponse <List <LoginRadiusEvent> >(events);
                    Event.DataSource = userEvents != null ? userEvents : null;
                    Event.DataBind();

                    //create object to execute following api to get followings
                    FollowingAPI followings = new FollowingAPI();

                    //To get followings data with the help of following api object as parameter.
                    // and pass "LoginRadiusFollowing" model as interface to map following data.
                    var userFollowings = client.GetResponse <List <LoginRadiusFollowing> >(followings);
                    Following.DataSource = userFollowings != null ? userFollowings : null;
                    Following.DataBind();

                    //create object to execute group api to get groups
                    GroupAPI groups = new GroupAPI();

                    //To get groups data with the help of group api object as parameter.
                    // and pass "LoginRadiusGroup" model as interface to map group data.
                    var userGroups = client.GetResponse <List <LoginRadiusGroup> >(groups);
                    Group.DataSource = userGroups != null ? userGroups : null;
                    Group.DataBind();

                    //create object to execute like api to get likes
                    LikeAPI likes = new LikeAPI();

                    //To get likes data with the help of like api object as parameter.
                    // and pass "LoginRadiusLike" model as interface to map like data.
                    var userLikes = client.GetResponse <List <LoginRadiusLike> >(likes);
                    Like.DataSource = userLikes != null ? userLikes : null;
                    Like.DataBind();


                    //create object to execute mention api to get mentions
                    MentionAPI mentions = new MentionAPI();

                    //To get mentions data with the help of mention api object as parameter.
                    // and pass "LoginRadiusMention" model as interface to map mention data.
                    var userMentions = client.GetResponse <List <LoginRadiusMention> >(mentions);
                    Mention.DataSource = userMentions != null ? userMentions : null;
                    Mention.DataBind();

                    //create object to execute page api to get pages
                    PageAPI pages = new PageAPI();

                    //To get pages data with the help of page api object as parameter.
                    // and pass "LoginRadiusPage" model as interface to map page data.
                    var userPages = client.GetResponse <List <LoginRadiusPage> >(pages);
                    Pages.DataSource = userPages != null ? userPages : null;
                    Pages.DataBind();

                    //create object to execute photo api to get photos
                    PhotoAPI photos = new PhotoAPI();

                    //To get photos data with the help of photo api object as parameter.
                    // and pass "LoginRadiusPhoto" model as interface to map photo data.
                    var userPhotos = client.GetResponse <List <LoginRadiusPhoto> >(photos);
                    Photo.DataSource = userPhotos != null ? userPhotos : null;
                    Photo.DataBind();

                    //create object to execute post api to get posts
                    PostAPI posts = new PostAPI();

                    //To get posts data with the help of post api object as parameter.
                    // and pass "LoginRadiusPost" model as interface to map post data.
                    var userPosts = client.GetResponse <List <LoginRadiusPost> >(posts);
                    Post.DataSource = userPosts != null ? userPosts : null;
                    Post.DataBind();

                    //create object to execute status api to get statuses
                    StatusAPI statuses = new StatusAPI();

                    //To get statuses data with the help of status api object as parameter.
                    // and pass "LoginRadiusStatus" model as interface to map status data.
                    var userStatuses = client.GetResponse <List <LoginRadiusStatus> >(statuses);
                    Statuses.DataSource = userStatuses != null ? userStatuses : null;
                    Statuses.DataBind();

                    //create object to execute video api to get videos
                    VideoAPI videos = new VideoAPI();

                    //To get videos data with the help of video api object as parameter.
                    // and pass "LoginRadiusVideo" model as interface to map video data.
                    var userVideos = client.GetResponse <List <LoginRadiusVideo> >(videos);
                    Video.DataSource = userVideos != null ? userVideos : null;
                    Video.DataBind();
                }
                catch (Exception ee)
                {
                    Response.Write(ee.StackTrace);
                }
            }
        }
예제 #17
0
        public Event GetEventById(int id)
        {
            EventAPI eventAPI = new EventAPI();

            return(eventAPI.GetEventById(id));
        }
예제 #18
0
        Event InterfaceEvent.GetEventByName(string Name)
        {
            EventAPI @event = new EventAPI();

            return(@event.GetEventByName(Name));
        }
예제 #19
0
        List <string> InterfaceEvent.GetEventsName()
        {
            EventAPI @event = new EventAPI();

            return(@event.GetEventsName());
        }
예제 #20
0
 public GameEvent(int DBID) : base(DBID)
 {
     this.m_eventAPI = GetEventAPI();
 }
예제 #21
0
 public GameEvent() : base()
 {
     this.m_eventAPI = GetEventAPI();
 }
예제 #22
0
        public List <Event> GetEvents()
        {
            EventAPI eventAPI = new EventAPI();

            return(eventAPI.GetEvents());
        }
예제 #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //create callback to get access token and request tokem
            LoginRadiusCallback callback = new LoginRadiusCallback();

            //If Request as LoginRadius callback, after user successfully loggedin on provider.
            if (callback.IsCallback)
            {
                //To get access token with the help of loginradius "api secret"
                var accessToken = callback.GetAccessToken(ConfigurationManager.AppSettings["apisecret"].ToString());

                //save token to session for further use
                Session["token"] = accessToken;

                try
                {
                    //create client with the help of access token as parameter
                    LoginRadiusClient client = new LoginRadiusClient(accessToken);

                    //create object to execute user profile api to get user profile data.
                    UserProfileAPI userprofile = new UserProfileAPI();

                    //To get ultimate user profile data with the help of user profile api object as parameter.
                    // and pass "LoginRadiusUltimateUserProfile" model as interface to map user profile data.
                    var userProfileData = client.GetResponse<LoginRadiusUltimateUserProfile>(userprofile);

                    if (userProfileData.Provider.ToLower() == "facebook" || userProfileData.Provider.ToLower() == "twitter" || userProfileData.Provider.ToLower() == "linkedin")
                    {
                        postmessage.Visible = true;
                    }
                    else
                    {
                        postmessage.Visible = false;
                    }
                    if (userProfileData.Provider.ToLower() == "twitter" || userProfileData.Provider.ToLower() == "linkedin")
                    {
                        directmessage.Visible = true;
                    }
                    else
                    {
                        directmessage.Visible = false;
                    }

                    name.Text = "<b>Full Name : </b>" + userProfileData.FullName;
                    if (userProfileData.Email != null)
                    {
                        emailid.Text = "<b>Email ID  : </b>" + userProfileData.Email[0].Value;
                    }
                    about.Text = "<b>About     : </b>" + userProfileData.About;
                    if (userProfileData.ImageUrl != null && userProfileData.ImageUrl != "")
                    {
                        userprofileimage.ImageUrl = userProfileData.ImageUrl;
                    }
                    else
                    {
                        userprofileimage.ImageUrl = "Content/images/no_image.png";
                    }

                    if(userProfileData.ID != null)
                    {
                        Truserid.Visible = true;
                    }
                    if(userProfileData.Gender != null)
                    {
                        Trgender.Visible = true;
                    }
                    if(userProfileData.Provider != null)
                    {
                        Trprovider.Visible = true;
                    }
                    if(userProfileData.ProfileName != null)
                    {
                        TrProfileName.Visible = true;
                    }
                    if(userProfileData.Age != null)
                    {
                        Trage.Visible = true;
                    }
                    if(userProfileData.Quota != null)
                    {
                        Trquota.Visible = true;
                    }
                    if(userProfileData.MainAddress != null)
                    {
                        TrMainAddress.Visible = true;
                    }
                    if(userProfileData.HomeTown != null)
                    {
                        TrHomeTown.Visible = true;
                    }
                    if(userProfileData.PhoneNumbers != null)
                    {
                        TrPhoneNumbers.Visible = true;
                    }
                    if(userProfileData.ProfileCountry != null)
                    {
                        TrProfileCountry.Visible = true;
                    }
                    if(userProfileData.ProfileUrl != null)
                    {
                        TrProfileUrl.Visible = true;
                    }
                    if(userProfileData.Religion != null)
                    {
                        TrReligion.Visible = true;
                    }
                    if(userProfileData.RelationshipStatus != null)
                    {
                        TrRelationshipStatus.Visible = true;
                    }
                    if(userProfileData.State != null)
                    {
                        TrState.Visible = true;
                    }
                     if(userProfileData.TimeZone != null)
                    {
                        Trtimezone.Visible = true;
                    }
                   if(userProfileData.LocalLanguage != null)
                    {
                        Trlocallanguage.Visible = true;
                    }
                    if(userProfileData.Website != null)
                    {
                        Trwebsite.Visible = true;
                    }
                    if(userProfileData.BirthDate != null)
                    {
                        Trdateofbirth.Visible = true;
                    }

                    gender.Text = userProfileData.Gender;
                    age.Text = userProfileData.Age;
                    dateofbirth.Text = userProfileData.BirthDate;
                    website.Text = userProfileData.Website;
                    locallanguage.Text = userProfileData.LocalLanguage;
                    timezone.Text = userProfileData.TimeZone;
                    State.Text = userProfileData.State;
                    RelationshipStatus.Text = userProfileData.RelationshipStatus;
                    Religion.Text = userProfileData.Religion;
                    ProfileCountry.Text = userProfileData.ProfileCountry;
                    ProfileUrl.Text = userProfileData.ProfileUrl;
                    HomeTown.Text = userProfileData.HomeTown;
                    MainAddress.Text = userProfileData.MainAddress;
                    userid.Text = userProfileData.ID;
                    provider.Text = userProfileData.Provider;
                    localcity.Text = userProfileData.LocalCity;
                    localcountry.Text = userProfileData.LocalCountry;
                    ProfileName.Text = userProfileData.ProfileName;
                    quota.Text = userProfileData.Quota;

                    if (userProfileData.Addresses != null)
                    {
                        address.Visible = true;
                    }
                    if (userProfileData.Positions != null)
                    {
                        position.Visible = true;
                    }
                    if (userProfileData.Educations != null)
                    {
                        educationss.Visible = true;
                    }
                    positions.DataSource = userProfileData.Positions;
                    positions.DataBind();
                    educations.DataSource = userProfileData.Educations;
                    educations.DataBind();
                    addresses.DataSource = userProfileData.Addresses;
                    addresses.DataBind();

                    //create object to execute album api to get albums
                    AlbumAPI albums = new AlbumAPI();

                    //To get albums data with the help of album api object as parameter.
                    // and pass "LoginRadiusAlbum" model as interface to map album data.
                    var userAlbums = client.GetResponse<List<LoginRadiusAlbum>>(albums);
                    Album.DataSource = userAlbums != null ? userAlbums : null;
                    Album.DataBind();

                    //create object to execute audio api to get audios
                    AudioAPI audios = new AudioAPI();

                    //To get audios data with the help of audio api object as parameter.
                    // and pass "LoginRadiusAudio" model as interface to map audio data.
                    var userAudios = client.GetResponse<List<LoginRadiusAudio>>(audios);
                    Audio.DataSource = userAudios != null ? userAudios : null;
                    Audio.DataBind();

                    //create object to execute checkin api to get checkins
                    CheckInAPI checkins = new CheckInAPI();

                    //To get checkins data with the help of checkin api object as parameter.
                    // and pass "LoginRadiusCheckIn" model as interface to map checkin data.
                    var userCheckins = client.GetResponse<List<LoginRadiusCheckIn>>(checkins);
                    CheckIn.DataSource = userCheckins != null ? userCheckins : null;
                    CheckIn.DataBind();

                    //create object to execute company api to get companies
                    CompanyAPI companies = new CompanyAPI();

                    //To get companies data with the help of company api object as parameter.
                    // and pass "LoginRadiusCompany" model as interface to map company data.
                    var userCompanies = client.GetResponse<List<LoginRadiusCompany>>(companies);
                    Company.DataSource = userCompanies != null ? userCompanies : null;
                    Company.DataBind();

                    //create object to execute contact api to get contacts
                    ContactAPI contacts = new ContactAPI();

                    //To get contacts data with the help of contact api object as parameter.
                    // and pass "LoginRadiusContact" model as interface to map contact data.
                    var userContacts = client.GetResponse<LoginRadiusCursorResponse<LoginRadiusContact>>(contacts);

                    Contact.DataSource = userContacts != null ? userContacts.Data : null;
                    Contact.DataBind();

                    //create object to execute event api to get events
                    EventAPI events = new EventAPI();

                    //To get events data with the help of event api object as parameter.
                    // and pass "LoginRadiusEvent" model as interface to map event data.
                    var userEvents = client.GetResponse<List<LoginRadiusEvent>>(events);
                    Event.DataSource = userEvents != null ? userEvents : null;
                    Event.DataBind();

                    //create object to execute following api to get followings
                    FollowingAPI followings = new FollowingAPI();

                    //To get followings data with the help of following api object as parameter.
                    // and pass "LoginRadiusFollowing" model as interface to map following data.
                    var userFollowings = client.GetResponse<List<LoginRadiusFollowing>>(followings);
                    Following.DataSource = userFollowings != null ? userFollowings : null;
                    Following.DataBind();

                    //create object to execute group api to get groups
                    GroupAPI groups = new GroupAPI();

                    //To get groups data with the help of group api object as parameter.
                    // and pass "LoginRadiusGroup" model as interface to map group data.
                    var userGroups = client.GetResponse<List<LoginRadiusGroup>>(groups);
                    Group.DataSource = userGroups != null ? userGroups : null;
                    Group.DataBind();

                    //create object to execute like api to get likes
                    LikeAPI likes = new LikeAPI();

                    //To get likes data with the help of like api object as parameter.
                    // and pass "LoginRadiusLike" model as interface to map like data.
                    var userLikes = client.GetResponse<List<LoginRadiusLike>>(likes);
                    Like.DataSource = userLikes != null ? userLikes : null;
                    Like.DataBind();

                    //create object to execute mention api to get mentions
                    MentionAPI mentions = new MentionAPI();

                    //To get mentions data with the help of mention api object as parameter.
                    // and pass "LoginRadiusMention" model as interface to map mention data.
                    var userMentions = client.GetResponse<List<LoginRadiusMention>>(mentions);
                    Mention.DataSource = userMentions != null ? userMentions : null;
                    Mention.DataBind();

                    //create object to execute page api to get pages
                    PageAPI pages = new PageAPI();

                    //To get pages data with the help of page api object as parameter.
                    // and pass "LoginRadiusPage" model as interface to map page data.
                    var userPages = client.GetResponse<List<LoginRadiusPage>>(pages);
                    Pages.DataSource = userPages != null ? userPages : null;
                    Pages.DataBind();

                    //create object to execute photo api to get photos
                    PhotoAPI photos = new PhotoAPI();

                    //To get photos data with the help of photo api object as parameter.
                    // and pass "LoginRadiusPhoto" model as interface to map photo data.
                    var userPhotos = client.GetResponse<List<LoginRadiusPhoto>>(photos);
                    Photo.DataSource = userPhotos != null ? userPhotos : null;
                    Photo.DataBind();

                    //create object to execute post api to get posts
                    PostAPI posts = new PostAPI();

                    //To get posts data with the help of post api object as parameter.
                    // and pass "LoginRadiusPost" model as interface to map post data.
                    var userPosts = client.GetResponse<List<LoginRadiusPost>>(posts);
                    Post.DataSource = userPosts != null ? userPosts : null;
                    Post.DataBind();

                    //create object to execute status api to get statuses
                    StatusAPI statuses = new StatusAPI();

                    //To get statuses data with the help of status api object as parameter.
                    // and pass "LoginRadiusStatus" model as interface to map status data.
                    var userStatuses = client.GetResponse<List<LoginRadiusStatus>>(statuses);
                    Statuses.DataSource = userStatuses != null ? userStatuses : null;
                    Statuses.DataBind();

                    //create object to execute video api to get videos
                    VideoAPI videos = new VideoAPI();

                    //To get videos data with the help of video api object as parameter.
                    // and pass "LoginRadiusVideo" model as interface to map video data.
                    var userVideos = client.GetResponse<List<LoginRadiusVideo>>(videos);
                    Video.DataSource = userVideos != null ? userVideos : null;
                    Video.DataBind();

                }
                catch (Exception ee)
                {
                    Response.Write(ee.StackTrace);
                }
            }
        }
예제 #24
0
        bool InterfaceEvent.DeleteEvent(int id)
        {
            EventAPI @event = new EventAPI();

            return(true);
        }
예제 #25
0
        bool InterfaceEvent.UpdateEvent(Event @event)
        {
            EventAPI eventAPI = new EventAPI();

            return(eventAPI.UpdateEvent(@event.Id, @event.EventName, @event.EventDescription));
        }
예제 #26
0
        int InterfaceEvent.GetEventIdByName(string name)
        {
            EventAPI eventAPI = new EventAPI();

            return(eventAPI.GetIdByName(name));
        }