Esempio n. 1
0
 private List <QuesListDisplayOutputDto> GetQuesListOutputDto(List <QuesList> quesList)
 {
     return(quesList.Select(q => new QuesListDisplayOutputDto()
     {
         id = q.ID,
         a = Cmn.GetUnCompressed(q.Answer, q.AnswerLength),
         q = q.Question,
         t = (int)QuesType.SUBJECTIVE
     }).ToList());
 }
 private List <TutorialContentOutputDto> GetTutorialContentOutputDto(List <TutorialContent> topicList)
 {
     return(topicList.Select(q => new TutorialContentOutputDto()
     {
         ID = q.ID,
         ParentID = q.ParentID,
         Seq = q.Seq,
         Title = q.Title,
         Description = Cmn.GetUnCompressed(q.Description, q.DescriptionLength),
         Type = q.Type
     }).ToList());
 }
Esempio n. 3
0
        private void LoadGlobalData()
        {
            GlobalList.Topics            = topicService.GetAll();
            GlobalList.Questions         = quesListService.GetAll();
            GlobalList.MultipleChoice    = multipleChoiceService.GetAll();
            GlobalList.ExternalResources = externalResourceService.GetAll();
            GlobalList.TutorialTitle     = tutorialTitleService.GetAll();
            GlobalList.TutorialSubtitle  = tutorialsubtitleService.GetAll();
            GlobalList.TutorialContent   = tutorialContentService.GetAll();

            GlobalList.TutorialContent.ToList().ForEach(c => c.DescriptionString = Cmn.GetUnCompressed(c.Description, c.DescriptionLength));
            GlobalList.Questions.ToList().ForEach(c => c.AnswerString            = Cmn.GetUnCompressed(c.Answer, c.AnswerLength));
        }
    void ShowData(int id)
    {
        rapidInfoModel.Identity a = rapidInfoModel.Identity.GetData(id);

        if (a != null)
        {
            lblId.Text   = a.Id.ToString();
            txtName.Text = a.Name;

            txtDetails.InnerHtml = Cmn.GetUnCompressed(a.Details, (int)a.DetailsLength);

            lblImage.Text = "<img src='" + ResolveClientUrl(@"~/Images/identity/" + a.Id + ".jpg") + "' alt='" + a.Name + "' height='80' />";
        }
    }
Esempio n. 5
0
 public HttpResponseMessage GetQuestion(HttpRequestMessage request, int id)
 {
     return(CreateHttpResponse(request, () =>
     {
         var ques = this.quesListService.GetByID(id);
         ques.AnswerString = Cmn.GetUnCompressed(ques.Answer, ques.AnswerLength);
         if (ques != null)
         {
             response = request.CreateResponse(HttpStatusCode.OK, new { ques });
         }
         else
         {
             response = request.CreateErrorResponse(HttpStatusCode.NotFound, id.ToString());
         }
         return response;
     }));
 }
Esempio n. 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Page_Load(sender, e);

        string str = "";

        if (Action == "")
        {
            Action = "people";
        }

        rapidInfoModel.Identity iden = rapidInfoModel.Identity.GetData(Action);

        if (iden != null)
        {
            //leftPanel.InnerHtml = "<img class='profileImg' src='" + ResolveClientUrl(@"~/Images/identity/" + iden.Id + ".jpg") + "' alt='" + iden.Name + "' />";


            str += "<h1>" + iden.Name + "</h1>";


            str += "<p>" + "<img class='profileImg' src='" + ResolveClientUrl(@"~/Images/identity/" + iden.Id + ".jpg") + "' alt='" + iden.Name + "' />" + Cmn.GetUnCompressed(iden.Details, (int)iden.DetailsLength) + "</p>";

            rightPanel.InnerHtml = str;

            return;
        }


        rapidInfoModel.Area a = rapidInfoModel.Area.GetDataByName(Action);

        List <rapidInfoModel.AreaLink> alList = rapidInfoModel.AreaLink.GetDataByArea(a.Id);

        if (alList.Count == 0)
        {
            str += "<h1>" + a.Name + "</h1><br/>";
            str += "<div class='row'>";

            List <rapidInfoModel.Area> ChildList = rapidInfoModel.Area.GetDataByParent(a.Id);
            var ctr = 0;

            foreach (rapidInfoModel.Area child in ChildList)
            {
                if (ctr % 4 == 0 && ctr != 0)
                {
                    str += "</div><br><br><div class='row'>";
                }

                string image = @"\image\" + child.Name.Replace(" ", "-").ToLower() + ".jpg";

                if (!File.Exists(Server.MapPath(image)))
                {
                    image = @"\image\notavailable.jpg";
                }

                str += "<div class='col-md-3 ' ><div style='border:1px solid rgb(134, 134, 134);padding:2px'><a class='newProductMenuBlock' href='/" + child.Name.Replace(" ", "").ToLower() +
                       "'><img class='img-responsive' style='width:100%;height:147px' src='" + image + "'><span class='ProductMenuCaption'><i class='fa fa-caret-right'></i>" + child.Name + "</span></a></div></div>";

                ctr++;

                //str += "<li><a href='/" + child.Name.Replace(" ", "").ToLower() + "'>" + child.Name + "</a></li>";
            }

            str += "</div>";
        }
        else
        {
            //str += "<h1>";


            str += "<h1>" + a.Name + "</h1><br/>";

            str += "<div class='row'>";
            var ctr = 0;

            foreach (rapidInfoModel.AreaLink child in alList)
            {
                if (ctr % 4 == 0 && ctr != 0)
                {
                    str += "</div><br><br><div class='row'>";
                }

                rapidInfoModel.Identity identity = rapidInfoModel.Identity.GetData(child.IdentityId);

                string image = @"\images\identity\" + identity.Id + ".jpg";

                if (!File.Exists(Server.MapPath(image)))
                {
                    image = @"\image\notavailable.jpg";
                }

                str += "<div class='col-md-2 ' ><div style='border:1px solid rgb(134, 134, 134);padding:2px'><a class='newProductMenuBlock' href='/" + identity.Name.Replace(" ", "").ToLower() +
                       "'><img class='img-responsive' style='width:100%;height:170px' src='" + image + "'><span class='ProductMenuCaption'><i class='fa fa-caret-right'></i>" + identity.Name + "</span></div></div>";

                ctr++;

                //str += "<li><a href='/" + identity.Name.Replace(" ", "").ToLower() + "'>" + identity.Name + "</a></li>";
            }

            str += "</div>";
        }

        rightPanel.InnerHtml = str;
    }