public List<idstype> idstypeGetAll()
 {
     List<idstype> lstidstype = new List<idstype>();
     try
     {
         DataTable dt = SqlHelper.ExecuteDataset(SqlImplHelper.getConnectionString(), "idstypeGetAll").Tables[0];
         if (dt.Rows.Count > 0)
         {
             int colIdsTypeId =  dt.Columns["IdsTypeId"].Ordinal;
             int colIdsTypeName =  dt.Columns["IdsTypeName"].Ordinal;
             int colIdsTypeVersion =  dt.Columns["IdsTypeVersion"].Ordinal;
             for (int i = 0; dt.Rows.Count > i; i++)
             {
                 idstype NewEnt = new idstype();
                 NewEnt.IdsTypeId = Int32.Parse(dt.Rows[i].ItemArray[colIdsTypeId].ToString());
                 NewEnt.IdsTypeName = dt.Rows[i].ItemArray[colIdsTypeName].ToString();
                 NewEnt.IdsTypeVersion = dt.Rows[i].ItemArray[colIdsTypeVersion].ToString();
                 lstidstype.Add(NewEnt);
             }
         }
         return lstidstype;
     }
     catch(Exception ex)
     {
         throw ex;
     }
 }
示例#2
0
        public List <idstype> idstypeGetAll()
        {
            List <idstype> lstidstype = new List <idstype>();

            try
            {
                DataTable dt = SqlHelper.ExecuteDataset(SqlImplHelper.getConnectionString(), "idstypeGetAll").Tables[0];
                if (dt.Rows.Count > 0)
                {
                    int colIdsTypeId      = dt.Columns["IdsTypeId"].Ordinal;
                    int colIdsTypeName    = dt.Columns["IdsTypeName"].Ordinal;
                    int colIdsTypeVersion = dt.Columns["IdsTypeVersion"].Ordinal;
                    for (int i = 0; dt.Rows.Count > i; i++)
                    {
                        idstype NewEnt = new idstype();
                        NewEnt.IdsTypeId      = Int32.Parse(dt.Rows[i].ItemArray[colIdsTypeId].ToString());
                        NewEnt.IdsTypeName    = dt.Rows[i].ItemArray[colIdsTypeName].ToString();
                        NewEnt.IdsTypeVersion = dt.Rows[i].ItemArray[colIdsTypeVersion].ToString();
                        lstidstype.Add(NewEnt);
                    }
                }
                return(lstidstype);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#3
0
 public int idstypeAdd(idstype idstype)
 {
     try
     {
         return((int)SqlHelper.ExecuteScalar(SqlImplHelper.getConnectionString(), "idstypeAdd",
                                             idstype.IdsTypeName));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public int idstypeAdd( idstype idstype)
 {
     try
     {
         return (int)SqlHelper.ExecuteScalar(SqlImplHelper.getConnectionString(), "idstypeAdd",
                                                                                     idstype.IdsTypeName,
                                                                                     idstype.IdsTypeVersion);
     }
     catch(Exception ex)
     {
         throw ex;
     }
 }
示例#5
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();
            }
        }
示例#6
0
        public idstype idstypeGetById(int IdsTypeId)
        {
            try
            {
                DataTable dt = SqlHelper.ExecuteDataset(SqlImplHelper.getConnectionString(), "idstypeGetById",
                                                        IdsTypeId).Tables[0];
                idstype NewEnt = new idstype();

                if (dt.Rows.Count > 0)
                {
                    DataRow dr = dt.Rows[0];
                    NewEnt.IdsTypeId   = Int32.Parse(dr["IdsTypeId"].ToString());
                    NewEnt.IdsTypeName = dr["IdsTypeName"].ToString();
                }
                return(NewEnt);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#7
0
 public bool idstypeUpdate(idstype idstype)
 {
     try
     {
         int update = SqlHelper.ExecuteNonQuery(SqlImplHelper.getConnectionString(), "idstypeUpdate",
                                                idstype.IdsTypeId,
                                                idstype.IdsTypeName);
         if (update > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public idstype idstypeGetById(int IdsTypeId)
        {
            try
            {
                DataTable dt = SqlHelper.ExecuteDataset(SqlImplHelper.getConnectionString(), "idstypeGetById",
                                                                                                    IdsTypeId).Tables[0];
                idstype NewEnt = new idstype();

                if(dt.Rows.Count > 0)
                {
                    DataRow dr = dt.Rows[0];
                    NewEnt.IdsTypeId = Int32.Parse(dr["IdsTypeId"].ToString());
                    NewEnt.IdsTypeName = dr["IdsTypeName"].ToString();
                    NewEnt.IdsTypeVersion = dr["IdsTypeVersion"].ToString();
                }
                return NewEnt;
            }
            catch(Exception ex)
            {
                throw ex;
            }
        }
 public bool idstypeUpdate( idstype idstype)
 {
     try
     {
         int update = SqlHelper.ExecuteNonQuery(SqlImplHelper.getConnectionString(), "idstypeUpdate",
                                                                                     idstype.IdsTypeId,
                                                                                     idstype.IdsTypeName,
                                                                                     idstype.IdsTypeVersion);
         if (update > 0)
         {
             return true;
         }
         else
         {
             return false;
         }
     }
     catch(Exception ex)
     {
         throw ex;
     }
 }
示例#10
0
 public bool idstypeUpdate(idstype idstype)
 {
     idstypeImpl oidstypeImpl = new idstypeImpl();
     return oidstypeImpl.idstypeUpdate( idstype);
 }
示例#11
0
 public int idstypeAdd(idstype idstype)
 {
     idstypeImpl oidstypeImpl = new idstypeImpl();
     return oidstypeImpl.idstypeAdd( idstype);
 }
示例#12
0
        public bool idstypeUpdate(idstype idstype)
        {
            idstypeImpl oidstypeImpl = new idstypeImpl();

            return(oidstypeImpl.idstypeUpdate(idstype));
        }
示例#13
0
        public int idstypeAdd(idstype idstype)
        {
            idstypeImpl oidstypeImpl = new idstypeImpl();

            return(oidstypeImpl.idstypeAdd(idstype));
        }