Exemplo n.º 1
0
        protected void getIDPSTypeData()
        {
            List <idstype> lstIDPSType = new List <idstype>();
            idstypeBus     oIDPSType   = new idstypeBus();

            lstIDPSType = oIDPSType.idstypeGetAll();

            if (lstIDPSType.Count > 0)
            {
                ddlIDPSType.DataSource     = lstIDPSType;
                ddlIDPSType.DataValueField = "idsTypeId";
                ddlIDPSType.DataTextField  = "idsTypeName";
                ddlIDPSType.DataBind();
            }
        }
Exemplo n.º 2
0
        protected void getIDPSData()
        {
            DataTable dttIDPS = new DataTable();

            dttIDPS.Columns.Add(new DataColumn("idsId", System.Type.GetType("System.Int32")));
            dttIDPS.Columns.Add(new DataColumn("idsName", System.Type.GetType("System.String")));
            dttIDPS.Columns.Add(new DataColumn("idsversion", System.Type.GetType("System.String")));
            dttIDPS.Columns.Add(new DataColumn("idsTypeId", System.Type.GetType("System.Int32")));
            dttIDPS.Columns.Add(new DataColumn("idsTypeDesc", System.Type.GetType("System.String")));
            dttIDPS.Columns.Add(new DataColumn("databaseTypeId", System.Type.GetType("System.Int32")));
            dttIDPS.Columns.Add(new DataColumn("databaseTypeDesc", System.Type.GetType("System.String")));
            dttIDPS.Columns.Add(new DataColumn("idsIP", System.Type.GetType("System.String")));
            dttIDPS.Columns.Add(new DataColumn("active", System.Type.GetType("System.Boolean")));

            List <ids> lstIDPS = new List <ids>();
            idsBus     oIDPS   = new idsBus();

            idstype    auxIDPSType = new idstype();
            idstypeBus oIDPSType   = new idstypeBus();

            databasestype    auxDatabaseType = new databasestype();
            databasestypeBus oDatabaseType   = new databasestypeBus();

            lstIDPS = oIDPS.idsGetAll();

            if (lstIDPS.Count > 0)
            {
                foreach (ids row in lstIDPS)
                {
                    auxIDPSType     = oIDPSType.idstypeGetById(row.IdsTypeId);
                    auxDatabaseType = oDatabaseType.databasestypeGetById(row.DatabaseTypeId);

                    dttIDPS.Rows.Add(row.IdsId,
                                     row.idsName,
                                     row.IdsVersion,
                                     row.IdsTypeId,
                                     auxIDPSType.IdsTypeName,
                                     row.DatabaseTypeId,
                                     auxDatabaseType.DatabaseName,
                                     row.IdsIP,
                                     row.Active);
                }

                gvIDPS.DataSource = dttIDPS;
                gvIDPS.DataBind();
            }
        }