当前位置: 首页>>代码示例>>C#>>正文


C# SQLHelper.ExecuteQuery方法代码示例

本文整理汇总了C#中SQLHelper.ExecuteQuery方法的典型用法代码示例。如果您正苦于以下问题:C# SQLHelper.ExecuteQuery方法的具体用法?C# SQLHelper.ExecuteQuery怎么用?C# SQLHelper.ExecuteQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SQLHelper的用法示例。


在下文中一共展示了SQLHelper.ExecuteQuery方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetSIMREG_REQUESTEDBYs

        public BESIMREG_REQUESTEDBYs GetSIMREG_REQUESTEDBYs(SQLHelper sqlHelper)
        {
            string sql = string.Empty;
            BESIMREG_REQUESTEDBYs SIMREG_REQUESTEDBYs = new BESIMREG_REQUESTEDBYs();
            try
            {
                sql = sqlHelper.MakeSQL(@"SELECT * FROM SIMREG_REQUESTEDBY ORDER BY REQUESTEDBYID");

                IDataReader reader = sqlHelper.ExecuteQuery(sql);
                AddToSIMREG_REQUESTEDBYCollection(SIMREG_REQUESTEDBYs, reader);
                reader.Close();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return SIMREG_REQUESTEDBYs;
        }
开发者ID:raselahmmedgit,项目名称:simreg-sample,代码行数:18,代码来源:DASIMREG_REQUESTEDBY.cs

示例2: GetSIMREG_REQUESTEDBY

 public BESIMREG_REQUESTEDBY GetSIMREG_REQUESTEDBY(SQLHelper sqlHelper, int SIMREG_REQUESTEDBYId)
 {
     string sql = string.Empty;
     BESIMREG_REQUESTEDBYs SIMREG_REQUESTEDBYs = new BESIMREG_REQUESTEDBYs();
     try
     {
         sql = sqlHelper.MakeSQL(@"SELECT * FROM SIMREG_REQUESTEDBY WHERE REQUESTEDBYID=$n ORDER BY REQUESTEDBYID", SIMREG_REQUESTEDBYId);
         IDataReader reader = sqlHelper.ExecuteQuery(sql);
         AddToSIMREG_REQUESTEDBYCollection(SIMREG_REQUESTEDBYs, reader);
         reader.Close();
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
     if (SIMREG_REQUESTEDBYs.Count > 0)
         return SIMREG_REQUESTEDBYs[0];
     else return new BESIMREG_REQUESTEDBY();
 }
开发者ID:raselahmmedgit,项目名称:simreg-sample,代码行数:19,代码来源:DASIMREG_REQUESTEDBY.cs

示例3: GetSIMREG_DELIVEREDBYbyUSERNAME

 public BESIMREG_DELIVEREDBY GetSIMREG_DELIVEREDBYbyUSERNAME(SQLHelper sqlHelper, string userName)
 {
     string sql = string.Empty;
     BESIMREG_DELIVEREDBYs SIMREG_DELIVEREDBYs = new BESIMREG_DELIVEREDBYs();
     try
     {
         sql = sqlHelper.MakeSQL(@"SELECT * FROM SIMREG_DELIVEREDBY WHERE USERNAME=$s", userName);
         IDataReader reader = sqlHelper.ExecuteQuery(sql);
         AddToSIMREG_DELIVEREDBYCollection(SIMREG_DELIVEREDBYs, reader);
         reader.Close();
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
     if (SIMREG_DELIVEREDBYs.Count > 0)
         return SIMREG_DELIVEREDBYs[0];
     else return new BESIMREG_DELIVEREDBY();
 }
开发者ID:raselahmmedgit,项目名称:simreg-sample,代码行数:19,代码来源:DASIMREG_DELIVEREDBY.cs

示例4: GetTableId

        public int GetTableId(SQLHelper sqlHelper, string idName, string tableName)
        {
            int tableId = 0;
            string strSQL = string.Empty;

            try
            {
                strSQL = sqlHelper.MakeSQL("SELECT MAX($s) FROM " + tableName.ToUpper(), idName);
                IDataReader reader = sqlHelper.ExecuteQuery(strSQL);

                if (reader.Read())
                {
                    tableId = Convert.ToInt32(reader[0]);
                }

                return tableId;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
开发者ID:raselahmmedgit,项目名称:simreg-sample,代码行数:22,代码来源:DATableCode.cs

示例5: GetSIMREG_DOMAINUSER

        public BESIMREG_DOMAINUSER GetSIMREG_DOMAINUSER(SQLHelper sqlHelper, string UserName)
        {
            string sql = string.Empty;
            BESIMREG_DOMAINUSERs SIMREG_DOMAINUSERs = new BESIMREG_DOMAINUSERs();

            try
            {
                sql = sqlHelper.MakeSQL("SELECT * FROM SIMREG_DOMAINUSER WHERE username=$s", UserName);
                IDataReader reader = sqlHelper.ExecuteQuery(sql);
                AddToCollection(SIMREG_DOMAINUSERs, reader);
                reader.Close();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            if (SIMREG_DOMAINUSERs.Count > 0)
            {
                return SIMREG_DOMAINUSERs[0];
            }
            else return new BESIMREG_DOMAINUSER();
        }
开发者ID:raselahmmedgit,项目名称:simreg-sample,代码行数:22,代码来源:DASIMREG_DOMAINUSER.cs

示例6: GetSIMREG_NEWFORMs

        public BESIMREG_NEWFORMs GetSIMREG_NEWFORMs(string msisdnTitle, string requestById, string requestTypeId, string deliverById, string requestFromDate, string requestToDate, string deliverFromDate, string deliverToDate, SQLHelper sqlHelper)
        {
            string sql = string.Empty;
            string whereSql = string.Empty;
            BESIMREG_NEWFORMs SIMREG_NEWFORMs = new BESIMREG_NEWFORMs();
            try
            {

                whereSql += sqlHelper.MakeSQL(sql + " MSISDNTITLE=nvl($s,MSISDNTITLE)", msisdnTitle);

                if (Convert.ToInt32(requestById) > 0)
                {
                    whereSql += sqlHelper.MakeSQL(sql + " AND REQUESTEDBYID=$n", requestById);
                }

                if (Convert.ToInt32(requestTypeId) > 0)
                {
                    whereSql += sqlHelper.MakeSQL(sql + " AND REQUESTEDTYPEID=$n", requestTypeId);
                }

                if (Convert.ToInt32(deliverById) > 0)
                {
                    whereSql += sqlHelper.MakeSQL(sql + " AND DELIVEREDBYID=$n", deliverById);
                }

                if (!String.IsNullOrEmpty(requestFromDate))
                {
                    whereSql += sqlHelper.MakeSQL(sql + " AND REQUESTEDDATE>=$s", requestFromDate);
                }

                if (!String.IsNullOrEmpty(requestToDate))
                {
                    whereSql += sqlHelper.MakeSQL(sql + "   AND REQUESTEDDATE<=$s", requestToDate);
                }

                if (!String.IsNullOrEmpty(deliverFromDate))
                {
                    whereSql += sqlHelper.MakeSQL(sql + " AND DELIVEREDBYDATE>=$s", deliverFromDate);
                }

                if (!String.IsNullOrEmpty(deliverToDate))
                {
                    whereSql += sqlHelper.MakeSQL(sql + "   AND DELIVEREDBYDATE<=$s", deliverToDate);
                }

                sql = sqlHelper.MakeSQL(@"SELECT * FROM SIMREG_NEWFORM WHERE $q ORDER BY ID", whereSql);

                IDataReader reader = sqlHelper.ExecuteQuery(sql);
                AddToSIMREG_NEWFORMCollection(SIMREG_NEWFORMs, reader);
                reader.Close();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return SIMREG_NEWFORMs;
        }
开发者ID:raselahmmedgit,项目名称:simreg-sample,代码行数:57,代码来源:DASIMREG_NEWFORM.cs

示例7: GetSIMREG_DOMAINUSERs

        public BESIMREG_DOMAINUSERs GetSIMREG_DOMAINUSERs(SQLHelper sqlHelper)
        {
            string sql = string.Empty;
            BESIMREG_DOMAINUSERs SIMREG_DOMAINUSERs = new BESIMREG_DOMAINUSERs();

            try
            {
                sql = sqlHelper.MakeSQL("SELECT userid, loginname, username FROM SIMREG_DOMAINUSER WHERE IsDeleted=$b", false);
                IDataReader reader = sqlHelper.ExecuteQuery(sql);
                AddToCollection(SIMREG_DOMAINUSERs, reader);
                reader.Close();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return SIMREG_DOMAINUSERs;
        }
开发者ID:raselahmmedgit,项目名称:simreg-sample,代码行数:18,代码来源:DASIMREG_DOMAINUSER.cs


注:本文中的SQLHelper.ExecuteQuery方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。