protected void getDatabasesData() { List <databasestype> lstDatabasesType = new List <databasestype>(); databasestypeBus oDatabasesType = new databasestypeBus(); lstDatabasesType = oDatabasesType.databasestypeGetAll(); if (lstDatabasesType.Count > 0) { ddlDatabaseType.DataSource = lstDatabasesType; ddlDatabaseType.DataValueField = "databaseTypeId"; ddlDatabaseType.DataTextField = "databaseName"; ddlDatabaseType.DataBind(); } }
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(); } }