예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (IsInternalUser)
         {
             Response.Redirect("/SunnetTicket/InternalDashboard.aspx");
         }
         var list = ticketApp.GetWorkingOnTickets(UserInfo.ID);
         if (list != null && list.Count > 0)
         {
             var ticketlist = list.Distinct(new CompareTicket()).ToList();
             rptTicketsList.DataSource = ticketlist;
             rptTicketsList.DataBind();
         }
         else
         {
             phlNoTicket.Visible = true;
         }
         _globalPage = this.Page as GlobalPage;
         List <UsersEntity> userList = new App.ProjectApplication().GetProjectUsersByUserId(UserInfo);
         userList        = userList.Distinct(new CompareUser()).ToList();
         hiUserIds.Value = string.Join(",", userList.Select(r => r.UserID).ToArray());
     }
 }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         List <UsersEntity> userList = new App.ProjectApplication().GetProjectUsersByUserId(UserInfo);
         userList        = userList.Distinct(new CompareUser()).ToList();
         hiUserIds.Value = string.Join(",", userList.Select(r => r.UserID).ToArray());
     }
 }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            projApp = new ProjectApplication();
            if (!Page.IsPostBack)
            {
                List <ProjectDetailDTO> list = projApp.GetUserProjects(UserInfo);
                switch (UserInfo.Role)
                {
                case RolesEnum.Leader:
                case RolesEnum.DEV:
                case RolesEnum.QA:
                    list = list.FindAll(r => r.CompanyID == Config.SunnetCompany);
                    break;
                }

                list.BindDropdown <ProjectDetailDTO>(ddlProjects, "Title", "ProjectID", "ALL", "-1");
                ddlYears.SelectedValue  = DateTime.Now.Year.ToString();
                ddlMonths.SelectedValue = DateTime.Now.Month.ToString();

                List <UsersEntity> userList = new App.ProjectApplication().GetProjectUsersByUserId(UserInfo);
                userList           = userList.Distinct(new CompareUser()).ToList();
                hiUserIds.Value    = string.Join(",", userList.Select(r => r.UserID).ToArray());
                ddlUser.DataSource = userList.OrderBy(r => r.FirstName);
                ddlUser.DataBind();
                ddlUser.Items.Insert(0, new ListItem()
                {
                    Text = "ALL", Value = "0"
                });
            }
            if (ddlProjects.Items.Count <= 0)
            {
                ddlProjects.Items.Add(new ListItem()
                {
                    Selected = true, Text = "None", Value = "0"
                });
            }
            DateTitle = DateTime.Now.ToString("MMMM yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo);
        }