Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                AboutBo      aboutBo       = new AboutBo(web);
                Organization retOrg        = new Organization(web);
                var          aboutInfoList = aboutBo.get_About(web, "0");
                rpAbout.DataSource = aboutInfoList;
                rpAbout.DataBind();

                var org = retOrg.getOrganizationChart(web);
                if (org.Any())
                {
                    var organizationChartInfor = org.FirstOrDefault();
                    if (organizationChartInfor != null)
                    {
                        ltContent.Text = organizationChartInfor.description;
                    }
                }

                var pageTitle = HttpContext.GetGlobalResourceObject("napas.resource", "Organization").ToString();
                pageTitle += " - " + HttpContext.GetGlobalResourceObject("napas.resource", "OrganizationChart").ToString();
                SetPageTitles(pageTitle);
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                aboutBo = new AboutBo(web);

                var id            = Request.QueryString["Id"];
                int currentId     = 0;
                var aboutInfoList = aboutBo.get_About(web, id);
                var aboutInfo     = new AboutInfo();

                if (aboutInfoList.Any())
                {
                    if (!int.TryParse(id, out currentId))
                    {
                        aboutInfo = aboutInfoList[0];
                    }
                    else
                    {
                        aboutInfo = aboutInfoList.First(c => c.Id == currentId);
                    }

                    ltContent.Text = aboutInfo.Content;
                    ltCat.Text     = aboutInfo.Title;

                    SetPageTitles(aboutInfo.Title);
                }

                rpAbout.DataSource = aboutInfoList;
                rpAbout.DataBind();
            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                aboutBo = new AboutBo(SPContext.Current.Web);
                getMilestone(web);

                var aboutInfoList = aboutBo.get_About(web, "0");
                rpAbout.DataSource = aboutInfoList;
                rpAbout.DataBind();

                var text = "Các mốc lịch sử, thành tựu";
                if (web.Language == 1033)
                {
                    text = "Milestones, Achievements";
                }

                ltCat.Text = text;
                SetPageTitles(text);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (SPContext.Current.Web.Language == 1033)
                {
                    division   = Constants.OrgNameEn.ExecutiveBoard;
                    buttonName = "Detail";
                }
                else
                {
                    division   = Constants.OrgNameVn.ExecutiveBoard;
                    buttonName = "Chi tiết";
                }

                AboutBo      aboutBo       = new AboutBo(SPContext.Current.Web);
                Organization retOrg        = new Organization(SPContext.Current.Web);
                var          aboutInfoList = aboutBo.get_About(web, "0");
                rpAbout.DataSource = aboutInfoList;
                rpAbout.DataBind();

                var pageTitle = HttpContext.GetGlobalResourceObject("napas.resource", "Organization").ToString();
                pageTitle += " - " + HttpContext.GetGlobalResourceObject("napas.resource", "ExecutiveBoard").ToString();
                SetPageTitles(pageTitle);

                var items = retOrg.getOrganizationBroad(web, division);
                for (int loop = 0; loop < items.Count; loop++)
                {
                    //@"<div class='list-item active'>
                    //</div>
                    if (levelText != items[loop].level)
                    {
                        if (levelText == "0")
                        {
                            ContentText += @"<div class='list-item active'>";
                        }
                        else
                        {
                            ContentText += @"<div class='list-item'>";
                        }
                    }
                    ContentText += String.Format(@"<div class='item'>
                                            <div class='image'>
                                                <img src={0}>
                                            </div>
                                            <div class='text'>
                                                <h3 style='height: 35px;'>{1}</h3>
                                                <p style='height: 50px;'>{2}</p>
                                                <a class='read-more' href='' data-toggle='modal' data-target='#modal-info-organize{3}'>{4}</a>
                                            </div>
                                        </div>", items[loop].Image, items[loop].personname, items[loop].duty, items[loop].Id, buttonName);
                    levelText    = items[loop].level;
                    if (loop + 1 == items.Count)
                    {
                        ContentText += "</div>";
                    }
                    else if (levelText != items[loop + 1].level)
                    {
                        ContentText += "</div>";
                    }
                    PopupText += string.Format(@"<div class='modal my-modal my-modal-organize fade' id='modal-info-organize{0}' tabindex='-1' role='dialog' aria-labelledby='mySmallModalLabel'>
                                    <div class='modal-dialog'>
                                        <div class='modal-wrap'>
                                            <span class='close-modal' data-dismiss='modal' aria-label='Close'>
                                            </span>
                                            <div class='bank-modal broad-modal'>
                                                <div class='modal-image'>
                                                    <img src={1}>
                                                    <h3>{2}</h3>
                                                    <p>{3}</p>
                                                </div>
                                                <div class='modal-text'>
                                                    {4}
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>", items[loop].Id, items[loop].Image, items[loop].personname, items[loop].duty, items[loop].history);
                }
                ltContent.Text = ContentText;
                PopupContent(PopupText);
            }
        }