• 大小: 34.46M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-24
  • 语言: 其他
  • 标签: 其他  

资源简介

company.zip

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using Model;
using System.Data;
using System.Data.SqlClient;
namespace BLL
{
   public class CommTool
    {
        /// 
        /// 执行一个查询语句,返回数据表对象
        /// 

        /// 要查询的表或视图名称
        /// 要查询的咧
        /// 条件
        /// datatable
        public DataTable getDataBycondition(string tablename string columns string condition)
        {
            SqlParameter[] pars= new SqlParameter[]{
         new SqlParameter(“@tablename“tablename)
         new SqlParameter(“@conlumns“columns)
         new SqlParameter(“@condition“condition)
         };
            return DAL.SqlDataHelper.SelectSqlReturnDataTable(“sp_getdatabyCondition“CommandType.StoredProcedurepars);
        }
            /// 
            /// 执行一个sql语句返回一条记录(数据阅读器)
            /// 

            /// 
            /// 
            /// 
            /// 
        public SqlDataReader getDataByCond(string tablename string columns string condition)
        {
            SqlParameter[] pars = new SqlParameter[]{
            new SqlParameter(“@tablename“tablename)
            new SqlParameter(“@conlumns“columns)
            new SqlParameter(“@condition“condition)
         };
            return DAL.SqlDataHelper.ExcuteSqlReturnReader(“sp_getdatabyCondition“ CommandType.StoredProcedure pars);
        }
       /// 
       /// 根据条件删除表对象
       /// 

       /// tablename
       /// 
       /// int
        public int deletetable(string tablename string condition)
        { 
        SqlParameter[] pars =new SqlParameter[]{
        new SqlParameter(“@tablename“tablename)
        new SqlParameter(“@condition“condition)
        };

            return  DAL.SqlDataHelper.ExcuteSQLReturnInt(“sp_daletetable“CommandType.StoredProcedurepars );
        }
       /// 
       /// 
       /// 

       /// 页码
       /// 每页显示的条数
       /// 表名
       /// 列名
       /// 条件
       /// 主键
       /// 
        public DataTable getpageindex(int pageindex int pagesize string tablename string columns string conditions string pk)
        {
            SqlParameter[] pars = new SqlParameter[]{
           new SqlParameter(“@pageindex“pageindex)
           new SqlParameter(“@pagesize“pagesize)
           new SqlParameter(“@tablename“tablename)
         

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-09-16 09:49  company\
     目录           0  2018-09-16 09:49  company\.vs\
     目录           0  2018-09-16 09:49  company\.vs\company\
     目录           0  2018-09-16 09:49  company\.vs\company\DesignTimeBuild\
     文件         244  2018-06-09 12:59  company\.vs\company\DesignTimeBuild\.dtbcache
     目录           0  2018-09-16 09:49  company\.vs\company\v15\
     文件      102912  2018-06-09 12:59  company\.vs\company\v15\.suo
     目录           0  2018-09-16 09:49  company\.vs\company\v15\Server\
     目录           0  2018-09-16 09:49  company\.vs\company\v15\Server\sqlite3\
     文件           0  2018-06-08 19:29  company\.vs\company\v15\Server\sqlite3\db.lock
     文件        4096  2018-06-08 19:29  company\.vs\company\v15\Server\sqlite3\storage.ide
     文件       32768  2018-06-09 12:59  company\.vs\company\v15\Server\sqlite3\storage.ide-shm
     文件      931152  2018-06-09 12:59  company\.vs\company\v15\Server\sqlite3\storage.ide-wal
     目录           0  2018-09-16 09:49  company\.vs\config\
     文件       85553  2018-06-09 12:58  company\.vs\config\applicationhost.config
     文件     1085440  2018-06-08 19:33  company\.vs\slnx.sqlite
     文件         179  2018-06-08 19:33  company\.vs\VSWorkspaceState.json
     目录           0  2018-10-16 17:03  company\BLL\
     目录           0  2018-09-16 09:49  company\BLL\bin\
     目录           0  2018-11-07 16:22  company\BLL\bin\Debug\
     文件       16896  2018-11-07 23:25  company\BLL\bin\Debug\BLL.dll
     文件       50688  2018-11-07 23:25  company\BLL\bin\Debug\BLL.pdb
     文件       12800  2018-11-07 23:25  company\BLL\bin\Debug\DAL.dll
     文件       30208  2018-11-07 23:25  company\BLL\bin\Debug\DAL.pdb
     文件       11776  2018-11-07 16:22  company\BLL\bin\Debug\Modle.dll
     文件       58880  2018-11-07 16:22  company\BLL\bin\Debug\Modle.pdb
     目录           0  2018-06-02 14:27  company\BLL\bin\Release\
     文件        3173  2018-10-16 17:34  company\BLL\BLL.csproj
     文件         227  2018-06-02 23:30  company\BLL\BLL.csproj.user
     文件        4098  2018-09-22 21:05  company\BLL\CommTool.cs
     文件        2696  2018-09-18 19:35  company\BLL\CompanyInfoBll.cs
............此处省略6219个文件信息

评论

共有 条评论