Ejemplo n.º 1
0
        public static string loadMoreCredits(string nextPage)
        {
            StringBuilder sbNews = new StringBuilder();

            try
            {
                string          userId = "5";
                ProfileServices pf     = new ProfileServices();
                //get news
                DataTable dtNews = pf.getProfileCredits(userId, nextPage);
                if (dtNews.Rows.Count > 0)
                {
                    for (int i = 0; i < dtNews.Rows.Count; i++)
                    {
                        sbNews.Append("<tr>");
                        sbNews.Append("<td>");
                        sbNews.Append(dtNews.Rows[i]["CreditLine1"]);
                        sbNews.Append("</td>");
                        sbNews.Append("<td>");
                        sbNews.Append(dtNews.Rows[i]["CreditLine2"]);
                        sbNews.Append("</td>");
                        sbNews.Append("<td>");
                        sbNews.Append(dtNews.Rows[i]["CreditLine3"]);
                        sbNews.Append("</td>");
                        sbNews.Append("</tr>");
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(sbNews.ToString());
        }
Ejemplo n.º 2
0
        public int checkmoreAvailableNews(string nextPage, string userId)
        {
            ProfileServices pf  = new ProfileServices();
            string          uid = pf.getUserIdUsingScreenName(userId);

            return(pf.moreNewsAvailable(nextPage, uid));
        }
Ejemplo n.º 3
0
        private bool SetHeartState(int ActivityId, bool newState)
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new ProfileServices(userId);

            return(service.LikeFeedItem(ActivityId));
        }
        private ProfileServices CreateProfileService()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new ProfileServices(userId);

            return(service);
        }
Ejemplo n.º 5
0
        private ProfileServices GetProfileService()
        {
            var userId  = User.Identity.GetUserId();
            var service = new ProfileServices(userId);

            return(service);
        }
Ejemplo n.º 6
0
        public ActionResult Create([Bind(Include = "Employee, Extension, HomePhone, MobilePhone, Address")] Profile profile)
        {
            Db db = new Db(DbServices.ConnectionString);

            if (ModelState.IsValid)
            {
                try
                {
                    ProfileServices.Insert(CurrentUser.Id, profile, db);
                    TempData["Success"] = ResourceServices.GetString(Cf.Data.Resources.ResourceBase.Culture, "UI", "InsertConfirmed");
                    return(RedirectToAction("Index"));
                }
                catch (CfException cfex)
                {
                    TempData["Failure"] = cfex.ErrorDefinition.LocalizedMessage;
                }
                catch (Exception ex)
                {
                    TempData["Failure"] = ex.Message;
                }
            }

            ViewBag.EmployeeList = new SelectList(EmployeeServices.List(db), "Id", "FirstName");
            return(View(profile));
        }
Ejemplo n.º 7
0
        public string GetSongDetails(string SongID)
        {
            StringBuilder sd = new StringBuilder();

            try
            {
                ProfileServices pf          = new ProfileServices();
                DataTable       songDetails = pf.GetSongDetails(SongID);
                if (songDetails.Rows.Count > 0)
                {
                    sd.Append("<div class='row'>");


                    sd.Append("<div class='col-md-6'>");
                    sd.Append("<div class='info-label'>Song Title</div>");
                    sd.Append("<div class='info-view'>" + songDetails.Rows[0]["songTitle"].ToString() + "</div>");
                    sd.Append("<div class='info-label'>Artist / Performer </div>");
                    sd.Append("<div class='info-view'>" + songDetails.Rows[0]["artist"].ToString() + "</div>");
                    string genres = "";
                    //get genre
                    string songPriGenre = pf.GetSongGenreforPopup(SongID);
                    genres = songPriGenre;
                    string songSecGenre = pf.GetSecSongGenreforPopup(SongID);
                    if (songPriGenre != "" && songSecGenre != "")
                    {
                        genres = genres + ",";
                    }
                    genres = genres + songSecGenre;
                    sd.Append("<div class='info-label'>Genre(s)</div>");
                    sd.Append("<div class='info-view'>" + genres + "</div>");
                    //sd.Append("<div class='info-label'>Secondary Genre</div>");
                    // sd.Append("<div class='info-view'>" + songSecGenre + "</div>");
                    sd.Append("<div class='info-label'>Vocal Mix Value </div>");
                    sd.Append("<div class='info-view'>" + songDetails.Rows[0]["VocalMix"].ToString() + "</div>");
                    sd.Append("</div>");

                    sd.Append("<div class='col-md-6'>");
                    sd.Append("<div class='info-label'>Tempo</div>");
                    sd.Append("<div class='info-view'>" + songDetails.Rows[0]["TEMPO"].ToString() + "</div>");
                    sd.Append("<div class='info-label'>BPM</div>");
                    sd.Append("<div class='info-view'>" + songDetails.Rows[0]["BPM"].ToString() + "</div>");
                    sd.Append("<div class='info-label'>Featured Instrument</div>");
                    sd.Append("<div class='info-view'>" + songDetails.Rows[0]["FeaturedInstrument"].ToString() + "</div>");
                    sd.Append("<div class='info-label'>Key Words</div>");
                    sd.Append("<div class='info-view'>" + songDetails.Rows[0]["KeyWord"].ToString() + "</div>");
                    sd.Append("</div>");



                    sd.Append("</div>");
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(sd.ToString());
        }
Ejemplo n.º 8
0
        public static string bioLoadMore()
        {
            ProfileServices pf            = new ProfileServices();
            string          userId        = "5";
            DataTable       dtProfileInfo = pf.getProfileInfo(userId);

            return(dtProfileInfo.Rows[0]["BIO"].ToString());
        }
Ejemplo n.º 9
0
        public string bioLoadMore(string userId)
        {
            ProfileServices pf            = new ProfileServices();
            string          uid           = pf.getUserIdUsingScreenName(userId);
            DataTable       dtProfileInfo = pf.getProfileInfo(uid);

            return(dtProfileInfo.Rows[0]["BIO"].ToString());
        }
Ejemplo n.º 10
0
        // GET: Profile
        public ActionResult Index()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new ProfileServices(userId);
            var model   = service.GetProfiles();

            return(View(model));
        }
Ejemplo n.º 11
0
        protected void loadVideos(string uid)
        {
            string          vCode = "";
            ProfileServices pf    = new ProfileServices();
            StringBuilder   sb    = new StringBuilder();
            string          ac    = "";
            DataTable       dtVP  = pf.getVideos(uid);

            if (dtVP.Rows.Count > 0)
            {
                lblVideoTitle.Visible = true;
                videosdiv.Visible     = true;
                int count = 0;
                for (int i = 0; i < dtVP.Rows.Count; i++)
                {
                    count += 1;
                    ac     = (i == 0 ? "active" : "");

                    /*if (i == 0)
                     * {
                     * ac = "active";
                     * }
                     * else {
                     * ac = "";
                     * }*/

                    if (count == 1)
                    {
                        sb.Append("<div class='item item-p " + ac + "'>");
                    }


                    // sb.Append("<div class='item " + ac + "'>");


                    string vURL = dtVP.Rows[i]["FileUrl"].ToString();
                    vURL = vURL.Replace("https://", "http://");
                    //if (IsYouTubeUrl(vURL))
                    //{
                    vCode = GetYouTubeVideo(vURL);
                    vCode = "<iframe src='http://www.youtube.com/embed/" + vCode + "' allowfullscreen=''   width='100%' frameborder='0' ></iframe>";


                    sb.Append("<div class='col-xs-6'>");
                    sb.Append(vCode);
                    sb.Append("</div>");

                    if ((count == 2) || (i == dtVP.Rows.Count - 1))
                    {
                        sb.Append("</div>");
                        count = 0;
                    }
                }
            }
            divVideos.InnerHtml = sb.ToString();
        }
Ejemplo n.º 12
0
        public string sendEmail(string userid, string fromname, string email, string subject, string message)
        {
            ProfileServices pf        = new ProfileServices();
            string          userEmail = pf.getUserEmailUsingScreenName(userid);

            MailHandler oH = new MailHandler();

            oH.SendMailUser(userEmail, fromname, email, subject, message);

            return("");
        }
Ejemplo n.º 13
0
        protected void loadNews(string uid)
        {
            StringBuilder sbNews = new StringBuilder();

            try
            {
                // string userId = "5";
                ProfileServices pf    = new ProfileServices();
                string          spath = Get_commonFilePath();
                //get news
                DataTable dtNews = pf.getProfileNews(uid, "1");

                if (dtNews.Rows.Count > 0)
                {
                    for (int i = 0; i < dtNews.Rows.Count; i++)
                    {
                        string imgpath = spath + "Profile_NewsImages/" + dtNews.Rows[i]["NewsID"] + ".jpg";
                        sbNews.Append("<div class='news-list-item'>");
                        sbNews.Append("<div class='news-item-image'>");


                        if (dtNews.Rows[i]["ImageYN"].ToString() == "N")
                        {
                            imgpath = spath + "Profile_NewsImages/default.jpg";
                        }
                        sbNews.Append("<img src='" + imgpath + "' width='60px' >");
                        sbNews.Append("</div>");
                        sbNews.Append("<div class='news-item-title'>");
                        sbNews.Append(dtNews.Rows[i]["NewsTitle"]);
                        sbNews.Append("</div>");
                        sbNews.Append("<div>");
                        sbNews.Append(dtNews.Rows[i]["NewsDescription"]);
                        sbNews.Append("</div>");
                        sbNews.Append("<div>");
                        sbNews.Append(Convert.ToDateTime(dtNews.Rows[i]["PublishDate"].ToString()).ToString("MMMM yyyy"));
                        sbNews.Append("</div>");
                        sbNews.Append("</div>");
                    }

                    //check more available
                    if (pf.moreNewsAvailable("1", uid) > 0)
                    {
                        morenews.Visible = true;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            newslist.InnerHtml = sbNews.ToString();
        }
Ejemplo n.º 14
0
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;
            DbClient DbClient = new DbClient();

            var      collection = DbClient.GetCollection("users");
            Profiles newProfile = new Profiles("1234", "sylvain");

            ProfileServices ps = new ProfileServices();

            ps.insertOne(collection, newProfile.toBsonDocument());
        }
Ejemplo n.º 15
0
        public ActionResult Delete(string id)
        {
            var service = new ProfileServices(id);

            if (service.DeleteAccount(id))
            {
                return(RedirectToAction("LogOff"));
            }

            Response.Redirect(Request.UrlReferrer.ToString());
            return(View());
        }
Ejemplo n.º 16
0
        public ActionResult Username(string username)
        {
            var profile = ProfileServices.GetProfile(username);

            if (profile != null)
            {
                return(View("Profile", profile));
            }
            else
            {
                return(View("Error"));
            }
        }
Ejemplo n.º 17
0
        protected void loadAwards(string uid)
        {
            ProfileServices pf    = new ProfileServices();
            string          spath = Get_commonFilePath();

            StringBuilder sbAwards = new StringBuilder();

            try
            {
                //string userId = "5";

                DataTable dtNews = pf.getProfileAwards(uid, "1");
                if (dtNews.Rows.Count > 0)
                {
                    for (int i = 0; i < dtNews.Rows.Count; i++)
                    {
                        string imgpath = spath + "Profile_AwardImages/" + dtNews.Rows[i]["AwardID"] + ".jpg";
                        sbAwards.Append("<div class='news-list-item'>");
                        sbAwards.Append("<div class='news-item-image'>");
                        if (dtNews.Rows[i]["ImageYN"].ToString() == "N")
                        {
                            imgpath = spath + "Profile_AwardImages/default.jpg";
                        }
                        sbAwards.Append("<img src='" + imgpath + "' width='60px' >");

                        sbAwards.Append("</div>");
                        sbAwards.Append("<div class='news-item-title'>");
                        sbAwards.Append(dtNews.Rows[i]["AwardTitle"]);
                        sbAwards.Append("</div>");
                        sbAwards.Append("<div>");
                        sbAwards.Append(dtNews.Rows[i]["Award"]);
                        sbAwards.Append("</div>");
                        sbAwards.Append("<div>");
                        sbAwards.Append(Convert.ToDateTime(dtNews.Rows[i]["CreatDateTime"].ToString()).ToString("MMMM yyyy"));
                        sbAwards.Append("</div>");
                        sbAwards.Append("</div>");
                    }
                    if (pf.moreAwardsAvailable("1", uid) > 0)
                    {
                        MoreAwards.Visible = true;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            AwardsList.InnerHtml = sbAwards.ToString();
        }
Ejemplo n.º 18
0
 public ProfileController()
 {
     UnitOfWork            = new UnitOfWork();
     ProfileServices       = new ProfileServices(UnitOfWork);
     GenderServices        = new GenderServices(UnitOfWork);
     BloodGroupServices    = new BloodGroupServices(UnitOfWork);
     NationalityServices   = new NationalityServices(UnitOfWork);
     MaritalStatusServices = new MaritalStatusServices(UnitOfWork);
     RegionServices        = new RegionServices(UnitOfWork);
     DistrictServices      = new DistrictServices(UnitOfWork);
     PostOfficeServices    = new PostOfficeServices(UnitOfWork);
     PoliceStationServices = new PoliceStationServices(UnitOfWork);
     DivisionServices      = new DivisionServices(UnitOfWork);
     CountryServices       = new CountryServices(UnitOfWork);
 }
Ejemplo n.º 19
0
        // GET: Profile/Delete/5
        public ActionResult Delete(Nullable <int> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Db      db      = new Db(DbServices.ConnectionString);
            Profile profile = ProfileServices.Get(id.Value, db);

            if (profile == null)
            {
                return(HttpNotFound());
            }
            return(View(profile));
        }
Ejemplo n.º 20
0
        public string loadMoreNews(string nextPage, string userId)
        {
            StringBuilder sbNews = new StringBuilder();

            try
            {
                // string userId = "5";
                ProfileServices pf  = new ProfileServices();
                string          uid = pf.getUserIdUsingScreenName(userId);
                //get news
                DataTable dtNews = pf.getProfileNews(uid, nextPage);
                string    spath  = Get_commonFilePath();
                if (dtNews.Rows.Count > 0)
                {
                    for (int i = 0; i < dtNews.Rows.Count; i++)
                    {
                        string imgpath = spath + "Profile_NewsImages/" + dtNews.Rows[i]["NewsID"] + ".jpg";
                        sbNews.Append("<div class='news-list-item'>");
                        sbNews.Append("<div class='news-item-image'>");

                        if (dtNews.Rows[i]["ImageYN"].ToString() == "N")
                        {
                            imgpath = spath + "Profile_NewsImages/default.jpg";
                        }

                        sbNews.Append("<img src='" + imgpath + "' width='60px' >");
                        sbNews.Append("</div>");
                        sbNews.Append("<div class='news-item-title'>");
                        sbNews.Append(dtNews.Rows[i]["NewsTitle"]);
                        sbNews.Append("</div>");
                        sbNews.Append("<div>");
                        sbNews.Append(dtNews.Rows[i]["NewsDescription"]);
                        sbNews.Append("</div>");
                        sbNews.Append("<div>");
                        sbNews.Append(Convert.ToDateTime(dtNews.Rows[i]["PublishDate"].ToString()).ToString("MMMM yyyy"));
                        sbNews.Append("</div>");
                        sbNews.Append("</div>");
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(sbNews.ToString());
        }
Ejemplo n.º 21
0
        static void Main(string[] args)
        {
            //Infrastructure - Context
            SocialNetworkContext context = new SocialNetworkContext();

            //Infrastructure - Repository
            ProfileRepository profileRepository = new ProfileRepository(context);

            //DomainServices
            ProfileServices profileServices = new ProfileServices(profileRepository);

            //ApplicationServices
            ApplicationServices appServices = new ApplicationServices(profileServices);

            //Seed
            Profile profile1 = new Profile()
            {
                Name = "Samii",
                Age  = 20
            };
            Profile profile2 = new Profile()
            {
                Name = "Alexandre",
                Age  = 21
            };
            Profile profile3 = new Profile()
            {
                Name = "Wagner",
                Age  = 22
            };

            //Chamando o serviço da camada de aplicação
            //para adicionar perfis a rede social
            appServices.AddNewProfile(profile1);
            appServices.AddNewProfile(profile2);
            appServices.AddNewProfile(profile3);

            //Imprimir todos os profiles
            foreach (var p in appServices.GetAllProfiles())
            {
                Console.WriteLine(p.Name);
            }

            Console.ReadLine();
        }
Ejemplo n.º 22
0
        // GET: Profile/Edit/5
        public ActionResult Edit(Nullable <int> employee)
        {
            Db db = new Db(DbServices.ConnectionString);

            if (employee == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Profile profile = ProfileServices.Get(employee.Value, db);

            if (profile == null)
            {
                return(HttpNotFound());
            }

            ViewBag.EmployeeList = new SelectList(EmployeeServices.List(db), "Id", "FirstName", profile.Employee);
            return(View(profile));
        }
Ejemplo n.º 23
0
        protected void loadReviews(string uid)
        {
            StringBuilder sbReviews = new StringBuilder();

            try
            {
                //string userId = "5";
                ProfileServices pf = new ProfileServices();

                //get news
                DataTable dtNews = pf.getProfileReviews(uid, "1");
                if (dtNews.Rows.Count > 0)
                {
                    for (int i = 0; i < dtNews.Rows.Count; i++)
                    {
                        sbReviews.Append("<div class='news-item'>");
                        sbReviews.Append("<div class='news-desc'>");

                        sbReviews.Append("<p><i>");
                        sbReviews.Append(dtNews.Rows[i]["Review"]);
                        sbReviews.Append("<i></p>");
                        sbReviews.Append("</div>");
                        sbReviews.Append("<h5>");
                        sbReviews.Append(dtNews.Rows[i]["WriteBy"]);
                        sbReviews.Append("</h5>");
                        sbReviews.Append("<span>");
                        sbReviews.Append(dtNews.Rows[i]["Institute"]);
                        sbReviews.Append("</span>");
                        sbReviews.Append("</div>");
                    }
                    //check more available
                    if (pf.moreReviewsAvailable("1", uid) > 0)
                    {
                        moreReviews.Visible = true;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            reviewsList.InnerHtml = sbReviews.ToString();
        }
Ejemplo n.º 24
0
        protected void loadCredits(string uid)
        {
            StringBuilder sbCredits = new StringBuilder();

            try
            {
                //  string userId = "5";
                ProfileServices pf = new ProfileServices();

                //get news
                DataTable dtNews = pf.getProfileCredits(uid, "1");
                if (dtNews.Rows.Count > 0)
                {
                    sbCredits.Append(" <table  border='1' cellpadding='10' id='creditsList'>");

                    for (int i = 0; i < dtNews.Rows.Count; i++)
                    {
                        sbCredits.Append("<tr>");
                        sbCredits.Append("<td>");
                        sbCredits.Append(dtNews.Rows[i]["CreditLine1"]);
                        sbCredits.Append("</td>");
                        sbCredits.Append("<td>");
                        sbCredits.Append(dtNews.Rows[i]["CreditLine2"]);
                        sbCredits.Append("</td>");
                        sbCredits.Append("<td>");
                        sbCredits.Append(dtNews.Rows[i]["CreditLine3"]);
                        sbCredits.Append("</td>");
                        sbCredits.Append("</tr>");
                    }
                    sbCredits.Append("</table>");
                    if (pf.moreCreditsAvailable("1", uid) > 0)
                    {
                        morecredits.Visible = true;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            divCredits.InnerHtml = sbCredits.ToString();
        }
Ejemplo n.º 25
0
        public void AddEventToCorrectUser_WhenParametersAreCorrect()
        {
            var    dbContextMock = new Mock <ApplicationDbContext>();
            int    eventId       = 1;
            string userName      = "******";
            var    newEvent      = new Event()
            {
                Id = eventId
            };
            var events = new List <Event>()
            {
                newEvent
            };

            var user = new ApplicationUser()
            {
                UserName = userName,
                Events   = events
            };
            var users = new List <ApplicationUser>()
            {
                user
            };

            var userSetMock  = new Mock <DbSet <ApplicationUser> >().SetupData(users);
            var eventSetMock = new Mock <DbSet <Event> >().SetupData(events);

            dbContextMock.Setup(m => m.Users).Returns(userSetMock.Object);
            dbContextMock.Setup(m => m.Events).Returns(eventSetMock.Object);

            var service = new ProfileServices(dbContextMock.Object);

            //Act
            service.JoinEvent(eventId, userName);

            //Assert
            var dbUser    = dbContextMock.Object.Users.First(u => u.UserName == userName);
            var userEvent = dbUser.Events.First(e => e.Id == eventId);

            Assert.AreEqual(eventId, userEvent.Id);

            dbContextMock.Verify(m => m.SaveChanges(), Times.Once);
        }
Ejemplo n.º 26
0
 public ActionResult DeleteConfirmed(int employee)
 {
     try
     {
         Db db = new Db(DbServices.ConnectionString);
         ProfileServices.Delete(CurrentUser.Id, employee, db);
         TempData["Success"] = ResourceServices.GetString(Cf.Data.Resources.ResourceBase.Culture, "UI", "DeleteConfirmed");
         // return RedirectToAction("Index");
     }
     catch (CfException cfex)
     {
         TempData["Failure"] = cfex.ErrorDefinition.LocalizedMessage;
     }
     catch (Exception ex)
     {
         TempData["Failure"] = ex.Message;
     }
     // return View(profile);
     return(RedirectToAction("Index"));
 }
Ejemplo n.º 27
0
        public static string loadMoreReviews(string nextPage)
        {
            StringBuilder sbNews = new StringBuilder();

            try
            {
                string          userId = "5";
                ProfileServices pf     = new ProfileServices();
                //get news
                DataTable dtNews = pf.getProfileReviews(userId, nextPage);
                if (dtNews.Rows.Count > 0)
                {
                    for (int i = 0; i < dtNews.Rows.Count; i++)
                    {
                        sbNews.Append("<div class='news-item'>");
                        sbNews.Append("<div class='news-image'>");
                        sbNews.Append("<img src='../images/news/n1.png'>");
                        sbNews.Append("</div>");
                        sbNews.Append("<div class='news-desc'>");
                        sbNews.Append("<h5>");
                        sbNews.Append(dtNews.Rows[i]["WriteBy"]);
                        sbNews.Append("</h5>");
                        sbNews.Append("<p>");
                        sbNews.Append(dtNews.Rows[i]["Review"]);
                        sbNews.Append("</p>");
                        sbNews.Append("</div>");
                        sbNews.Append("<span>");
                        sbNews.Append(dtNews.Rows[i]["Institute"]);
                        sbNews.Append("</span>");
                        sbNews.Append("</div>");
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(sbNews.ToString());
        }
Ejemplo n.º 28
0
        public static string loadMoreNews(string nextPage)
        {
            StringBuilder sbNews = new StringBuilder();

            try
            {
                string          userId = "5";
                ProfileServices pf     = new ProfileServices();
                //get news
                DataTable dtNews = pf.getProfileNews(userId, nextPage);
                if (dtNews.Rows.Count > 0)
                {
                    for (int i = 0; i < dtNews.Rows.Count; i++)
                    {
                        sbNews.Append("<div class='news-item'>");
                        sbNews.Append("<div class='news-image'>");
                        sbNews.Append("<img src='http://testapp.hitlicense.com//Profile_NewsImages//" + dtNews.Rows[i]["NewsID"].ToString() + ".jpg' width='100' height='100'>");
                        sbNews.Append("</div>");
                        sbNews.Append("<div class='news-desc'>");
                        sbNews.Append("<h5>");
                        sbNews.Append(dtNews.Rows[i]["NewsTitle"]);
                        sbNews.Append("</h5>");
                        sbNews.Append("<p>");
                        sbNews.Append(dtNews.Rows[i]["NewsDescription"]);
                        sbNews.Append("</p>");
                        sbNews.Append("</div>");
                        sbNews.Append("<span>");
                        sbNews.Append(dtNews.Rows[i]["PublishDate"]);
                        sbNews.Append("</span>");
                        sbNews.Append("</div>");
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(sbNews.ToString());
        }
Ejemplo n.º 29
0
        public string GetSongMetadataDetails(string SongID)
        {
            StringBuilder sd = new StringBuilder();

            try
            {
                ProfileServices pf          = new ProfileServices();
                DataTable       songDetails = pf.GetSongMetadataDetails(SongID);
                if (songDetails.Rows.Count > 0)
                {
                    sd.Append("<div class='row'>");


                    sd.Append("<div class='col-md-6'>");
                    sd.Append("<div class='info-label'> Writer(s) / Composer(s)</div>");
                    sd.Append("<div class='info-view'>" + songDetails.Rows[0]["WRITERS"].ToString() + "</div>");
                    sd.Append("<div class='info-label'> Artist / Performer(s)</div>");
                    sd.Append("<div class='info-view'>" + songDetails.Rows[0]["ARTIST"].ToString() + "</div>");
                    sd.Append("<div class='info-label'>ISWC#</div>");
                    sd.Append("<div class='info-view'>" + songDetails.Rows[0]["ISWC"].ToString() + "</div>");
                    sd.Append("</div>");
                    sd.Append("<div class='col-md-6'>");
                    sd.Append("<div class='info-label'>Publisher(s)</div>");
                    sd.Append("<div class='info-view'>" + songDetails.Rows[0]["PUBLISHER"].ToString() + "</div>");
                    sd.Append("<div class='info-label'>Label</div>");
                    sd.Append("<div class='info-view'>" + songDetails.Rows[0]["LABLE"].ToString() + "</div>");
                    sd.Append("</div>");



                    sd.Append("</div>");
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(sd.ToString());
        }
Ejemplo n.º 30
0
        public bool checkMoreSongsAvailable(string userid, int lastloadedSongsCount)
        {
            bool            output = false;
            ProfileServices pf     = new ProfileServices();
            string          uid    = pf.getUserIdUsingScreenName(userid);
            StringBuilder   sd     = new StringBuilder();

            try
            {
                int scount = pf.getSongsCount(uid);
                if (scount > lastloadedSongsCount)
                {
                    output = true;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(output);
        }