public static BaoJingRen GetById(string id)
        {
            DataTable dt = SqlHelper.Adapter("select * from T_报警人信息 where 案件编号=@案件编号 and isdel=0",
                                             new SqlParameter("@案件编号", id));

            return(ToBaoJingRen(dt.Rows[0]));
        }
Exemple #2
0
        public static CaseInfo GetById(string id)
        {
            DataTable dt = SqlHelper.Adapter("select * from T_案件基本信息 where 案件编号=@案件编号 and isDel=0",
                                             new SqlParameter("@案件编号", id));

            return(ToCaseInfo(dt.Rows[0]));
        }
Exemple #3
0
        private DataTable LoadAllProcNames()
        {
            String sql = "select name from sys.objects where type='P' and name like 'usp_report%'";
            var    dt  = SqlHelper.Adapter(sql);

            return(dt);
        }
Exemple #4
0
        public static CaseInfo[] GetAll()
        {
            DataTable dt = SqlHelper.Adapter("select * from T_案件基本信息 where isDel=0");

            CaseInfo[] cases = new CaseInfo[dt.Rows.Count];
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                cases[i] = ToCaseInfo(dt.Rows[i]);
            }
            return(cases);
        }
Exemple #5
0
        private String Export(String name)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("if exists(select 1 from sys.objects where type='P' and name='{0}'){1}", name, Environment.NewLine);
            sb.AppendFormat("drop proc {0}{1}", name, Environment.NewLine);
            sb.AppendFormat("go{0}", Environment.NewLine);
            var text = SqlHelper.Adapter("sp_helptext " + name);

            text.AsEnumerable().ToList().ForEach(dr =>
            {
                sb.Append(dr.Field <String>(0));
            });
            sb.AppendFormat("{0}go{0}", Environment.NewLine);
            return(sb.ToString());
        }