Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                var b = Request.QueryString["id"];
                if (b != null)
                    ((TIA)(this.Master)).accordion_selectedIndexChanged(System.Convert.ToInt16(b));

                ProlianceController prj = new ProlianceController();
                ProlianceConnection conn = new ProlianceConnection("https://na2.agpmis.com", "na", "admin", "?aecom");
                string prjAccount = "pgmprj://na/tia/rvly";

                List<County> theCountites = prj.GetCounties(conn, prjAccount, "rvly").ToList();
                foreach (County cty in theCountites)
                {
                    ListItem li = new ListItem { Enabled = true, Text = cty.Description, Value = cty.FullCode };
                    this.DropDownListCounty.Items.Add(li);
                }

                List<Band> theBands = prj.GetBands(conn, prjAccount).ToList();
                foreach (Band bnd in theBands)
                {
                    ListItem li = new ListItem { Enabled = true, Text = bnd.Description, Value = bnd.FullCode };
                    this.DropDownListBand.Items.Add(li);
                }

                List<ProjectTypes> theProjectTypes = prj.GetProjectTypes(conn, prjAccount).ToList();
                foreach (ProjectTypes pt in theProjectTypes)
                {
                    ListItem li = new ListItem { Enabled = true, Text = pt.Description, Value = pt.FullCode };
                    this.DropDownListProjectType.Items.Add(li);
                }

                List<ProjectStatus> theProjectStatus = prj.GetProjectStatus(conn, prjAccount).ToList();
                foreach (ProjectStatus st in theProjectStatus)
                {
                    ListItem li = new ListItem { Enabled = true, Text = st.Description, Value = st.FullCode };
                    this.DropDownListProjectStatus.Items.Add(li);
                }

                //List<Status> theStatusTypes = prj.GetStatusTypes(conn, prjAccount).ToList();
                //foreach (Status pt in theStatusTypes)
                //{
                //    ListItem li = new ListItem { Enabled = true, Text = pt.Description, Value = pt.FullCode };
                //    this.DropDownListActive.Items.Add(li);
                //}

                theData = prj.GetPreProjectList(conn, prjAccount);
                Cache["PrjData"] = theData;
                this.RepeaterProjectList.DataSource = theData;
                this.RepeaterProjectList.DataBind();
                if (!(theData.Tables[0].Rows.Count > 0))
                    this.Label1.Visible = true;
            }
        }