예제 #1
0
        public DataSet GetPrprtcertInfo(string HouseID, string Area)
        {
            string  sql = string.Format(@"select * from GetPrprtcertInfo where houseid='{0}'", HouseID);
            DataSet ds  = OleDBHelper.GetDataSet(sql);

            return(ds);
        }
예제 #2
0
        public NewDataSet GetNewDataSet(string name, string cardNo)
        {
            string  sql = string.Format("Select * from FC_Da_FWZM Where Name='{0}' and CardNo='{1}'", name, cardNo);
            DataSet ds  = OleDBHelper.GetDataSet(sql);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                IList <Table> tables = new List <Table>();
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    Table t = new Table();
                    t.ProveResultID = ds.Tables[0].Rows[i]["ProveResultID"].ToString();
                    t.BusiID        = ds.Tables[0].Rows[i]["BusiID"].ToString();
                    t.CardNo        = ds.Tables[0].Rows[i]["CardNo"].ToString();
                    t.Name          = ds.Tables[0].Rows[i]["Name"].ToString();
                    t.HouseSite     = ds.Tables[0].Rows[i]["HouseSite"].ToString();
                    t.Source        = ds.Tables[0].Rows[i]["Source"].ToString();
                    t.SourceDes     = ds.Tables[0].Rows[i]["SourceDes"].ToString();
                    t.Area          = ds.Tables[0].Rows[i]["Area"].ToString();
                    t.RightNo       = ds.Tables[0].Rows[i]["RightNo"].ToString();
                    tables.Add(t);
                }
                NewDataSet set1 = new NewDataSet();
                set1.Tables = tables.ToArray();
                return(set1);
            }
            else
            {
                return(null);
            }
        }
예제 #3
0
        public DataSet GetBuildRightInfo(string BuNo, string Area)
        {
            string  sql = string.Format("select \"HouseID\",\"HCSID\",\"HYCID\",\"BuildingID\",\"RoomNo\",\"权证号\",\"登记坐落\",\"登记用途\" from BuildingRightInfo where BuNo ='{0}'", BuNo);
            DataSet ds  = OleDBHelper.GetDataSet(sql);

            return(ds);
        }
예제 #4
0
        internal DataTable getREInfoFromBDC(string strHouseSite, string strCertCode)
        {
            string sql = @"select h.tstybm as HID,tsgl.bdcdyh,h.zl,h.jzmj,ghyt.ytmc as ghyt,fwjg.itemname as fwjg from dj_dy dy
left join dj_tsgl tsgl on tsgl.slbh = dy.slbh
left join fc_h_qsdc h on h.tstybm = tsgl.tstybm
left join fc_z_qsdc z on z.tstybm = h.lsztybm
left join dic_item @xzbdcggk fwjg on fwjg.itemval = z.fwjg and fwjg.diccode = '1505181711115COR1KAPMB'
left join DIC_FWYTLX @Xzbdcggk ghyt on ghyt.ytbm = h.ghyt
where 1=1 ";

            if (!string.IsNullOrEmpty(strHouseSite))
            {
                sql += string.Format(" and h.zl like '%{0}%'", strHouseSite);
            }
            if (!string.IsNullOrEmpty(strCertCode))
            {
                sql += string.Format("and dy.bdczmh = '{0}'", strCertCode);
            }

            if (IsHasSQLInject(sql))
            {
                return(null);
            }
            return(OleDBHelper.GetDataTable(sql));
        }
예제 #5
0
        public DataTable GetDYOpList(string strKeyWord, string sDate, string eDate, string strTXCertCode)
        {
            string sql    = @"select dy.slbh 抵押业务宗号,dy.djyy 他项权利种类,h.qm 区名,z.fwzl 坐落,h.zl 坐落细则,dy.bdbzzqse 权利价值,dy.qlqssj 抵押起始日期,dy.qljssj 抵押结束日期,dy.bdczmh 他项权证号,dy.fj 他项权证附记,DECODE(dy.lifecycle,1,'已注销','现势') 注销状态  from dj_dy dy
left join dj_tsgl tsgl on dy.slbh = tsgl.slbh
left join fc_h_qsdc h on h.tstybm = tsgl.tstybm
left join fc_z_qsdc z on z.tstybm = h.lsztybm
where dy.qlqssj between to_date('{1}', 'yyyy/mm/dd hh24:mi:ss') and to_date('{2}','yyyy/mm/dd hh24:mi:ss') 
and dy.slbh in (select qlrgl.slbh from dj_qlrgl qlrgl
 left join dj_qlr qlr on qlr.qlrid = qlrgl.qlrid
 where qlr.qlrmc like '%{0}%' and qlrgl.qlrlx='抵押权人') and tsgl.bdclx='房屋' {3} 
  group by dy.slbh,dy.djyy,h.qm,z.xmmc,z.fwzl,h.zl,dy.bdbzzqse,dy.qlqssj,dy.qljssj,dy.bdczmh,dy.fj,dy.lifecycle";
            string where1 = "";

            if (!string.IsNullOrEmpty(strTXCertCode))
            {
                where1 = string.Format("and dy.bdczmh='{0}'", strTXCertCode);
            }
            sql = string.Format(sql, strKeyWord, sDate, eDate, where1);

            try
            {
                if (IsHasSQLInject(sql))
                {
                    return(null);
                }
                return(OleDBHelper.GetDataTable(sql));
            }
            catch (Exception ex)
            {
                string str = ex.Message;
                return(null);
            }
        }
예제 #6
0
        public DataSet GetHouseState(string HouseID)
        {
            string  sql = string.Format("select * from GetHouseState where \"HouseID\" ='{0}'", HouseID);
            DataSet ds  = OleDBHelper.GetDataSet(sql);

            return(ds);
        }
예제 #7
0
        internal DataTable GetDYFormBDC(string slbh)
        {
//            string sql = @"select  qlrgl.qlrmc 权利人,'房屋所有权' 权利种类,dj_dy.bdczmh 他项权证号,fc_h_qsdc.zh 幢号,fc_h_qsdc.dyh||'-'||fc_h_qsdc.fjh 房号,fc_h_qsdc.jzmj 建筑面积,
//dj_dy.qlqssj 设定日期,dj_dy.bdbzzqse 权利价值,dj_dy.pgje 评估值,dj_dy.dyqx 约定期限, dj_dy.djyy 他项种类,dj_xgdjzx.djrq 注销日
//from dj_dy left join dj_tsgl on dj_dy.slbh=dj_tsgl.slbh left join fc_h_qsdc on fc_h_qsdc.tstybm=dj_tsgl.tstybm
//left join dj_xgdjzx on dj_xgdjzx.slbh=dj_xgdjgl.zslbh
//left join dj_xgdjgl on dj_xgdjgl.zslbh=dj_dy.slbh
//left join dj_djb djb on djb.slbh=dj_xgdjgl.fslbh
//left join dj_qlrgl qlrgl on qlrgl.slbh=dj_dy.slbh
//left join ql_fwxg fwxg on fwxg.slbh=dj_dy.slbh
//Where dj_dy.slbh ='{0}' and  qlrgl.qlrlx='抵押权人' and dj_tsgl.bdclx='房屋' ";


            string sql = @"select A.*,dj_xgdjzx.Djrq 注销日期,'' as 注销原因 from (

select dj_dy.slbh, qlrgl.qlrmc 权利人,'房屋所有权' 权利种类,dj_dy.bdczmh 他项权证号,fc_h_qsdc.zh 幢号,fc_h_qsdc.dyh||'-'||fc_h_qsdc.fjh 房号,fc_h_qsdc.jzmj 建筑面积,
dj_dy.qlqssj 设定日期,dj_dy.bdbzzqse 权利价值,dj_dy.pgje 评估值,dj_dy.dyqx 约定期限, dj_dy.djyy 他项种类 from dj_dy
left join dj_xgdjgl gl on gl.zslbh=dj_dy.slbh
left join dj_djb djb on djb.slbh=gl.fslbh
left join dj_qlrgl qlrgl on qlrgl.slbh=dj_dy.slbh 
left join ql_fwxg fwxg on fwxg.slbh=dj_dy.slbh
left join dj_tsgl on dj_dy.slbh=dj_tsgl.slbh 
left join fc_h_qsdc on fc_h_qsdc.tstybm=dj_tsgl.tstybm 
Where djb.slbh ='{0}' and  qlrgl.qlrlx='抵押权人' and dj_tsgl.bdclx='房屋' ) A
left join dj_xgdjgl on dj_xgdjgl.fslbh=A.slbh
left join dj_xgdjzx on dj_xgdjzx.slbh=dj_xgdjgl.zslbh";

            sql = string.Format(sql, slbh);
            if (IsHasSQLInject(sql))
            {
                return(null);
            }
            return(OleDBHelper.GetDataTable(sql));
        }
예제 #8
0
        public DataSet GetFirstRegistedInfo(string HouseId)
        {
            string sql = string.Format(@"Select * from fc_djyz
Where Upper(HouseId)='{0}'", HouseId.ToUpper());

            return(OleDBHelper.GetDataSet(sql));
        }
예제 #9
0
        internal DataTable GetQSInfoListFromBDC(string bdczh, string qlrmc, string zjhm, string zl)
        {
            string sql = @"select distinct djb.slbh 业务ID,djb.slbh 自然状况登记簿ID,nvl(nvl(h.oracle_wb_houseid,h.oracle_houseinfo_id),h.tstybm) 房屋ID,djb.slbh 业务宗号,h.zl 房屋坐落,djb.djlx 登记类型,djb.djyy 业务种类,djb.bdczh 证号,
djb.djrq 登簿时间,2 as 状态
 from dj_djb djb
left join dj_tsgl tsgl on tsgl.slbh=djb.slbh
left join fc_h_qsdc h on h.tstybm=tsgl.tstybm 
left join fc_h_qsdc h on h.tstybm=tsgl.tstybm
left join dj_qlrgl gl on gl.slbh=djb.slbh
left join dj_qlr qlr on gl.qlrid=qlr.qlrid 
where gl.qlrlx='权利人' and  tsgl.bdclx='房屋' and (djb.lifecycle=0 or djb.lifecycle is null) ";

            if (!string.IsNullOrEmpty(bdczh))
            {
                sql += string.Format(" and djb.bdczh='{0}'", bdczh);
            }
            if (!string.IsNullOrEmpty(qlrmc))
            {
                sql += string.Format(" and gl.qlrmc='{0}'", qlrmc);
            }
            if (!string.IsNullOrEmpty(zjhm))
            {
                sql += string.Format(" and qlr.zjhm='{0}'", zjhm);
            }
            if (!string.IsNullOrEmpty(zl))
            {
                sql += string.Format(" and h.zl like '%{0}%'", zl);
            }
            if (IsHasSQLInject(sql))
            {
                return(null);
            }
            return(OleDBHelper.GetDataTable(sql));
        }
예제 #10
0
        /// <summary>
        /// 领证信息收费发证信息
        /// </summary>
        /// <param name="ywzh"></param>
        /// <returns></returns>
        public DataTable GetCLF_LZXX_SFFZ(string ywzh)
        {
            string    sql    = string.Format(@"select State,FZState from CLF_LZXX_SFXX where ywzh='{0}'", ywzh);
            DataTable dt     = OleDBHelper.GetDataTable(sql);
            DataTable dtCopy = dt.Copy();

            dtCopy.TableName = "SFFZXX";
            return(dtCopy);
        }
예제 #11
0
        public DataTable GetCLF_CFXX(string ywzh)
        {
            string    sql    = string.Format("select * from CLF_CFXX where ywzh ='{0}'", ywzh);
            DataTable dt     = OleDBHelper.GetDataTable(sql);
            DataTable dtCopy = dt.Copy();

            dtCopy.TableName = "houseChaFenInfo";
            return(dtCopy);
        }
예제 #12
0
        public DataTable GetCLF_ZTXX(string ywzh)
        {
            string    sql    = string.Format("select * from CLF_ZTXX where  YWZH='{0}'", ywzh);
            DataTable dt     = OleDBHelper.GetDataTable(sql);
            DataTable dtCopy = dt.Copy();

            dtCopy.TableName = "HouseOwnerInfo";
            return(dtCopy);
        }
예제 #13
0
        public DataTable GetCLF_ZTXX(string syqr, string qzbh)
        {
            string    sql    = string.Format("select * from CLF_ZTXX where syqr ='{0}' and QZBH like '%{1}%'", syqr, qzbh);
            DataTable dt     = OleDBHelper.GetDataTable(sql);
            DataTable dtCopy = dt.Copy();

            dtCopy.TableName = "HouseOwnerInfo";
            return(dtCopy);
        }
예제 #14
0
        public bool GetIsRegistedHouse(string HouseId)
        {
            string sql      = string.Format(@"Select Count(1) From DJ_TSGL 
Left Join FC_H_QSDC on DJ_TSGL.TSTYBM=FC_H_QSDC.TSTYBM
Where Nvl2(DJ_TSGL.LifeCycle,DJ_TSGL.LifeCycle,0)=0 And FC_H_QSDC.TSTYBM='{0}'", HouseId);
            int    rowCount = OleDBHelper.GetScalar(sql);

            return(true);
        }
예제 #15
0
        public DataTable GetCLF_LZXX_QTXX(string ywzh)
        {
            string    sql    = string.Format(@"select PrintState,SFState,FZState,DYQZBH from CLF_LZXX_DYXX where ywzh='{0}'", ywzh);
            DataTable dt     = OleDBHelper.GetDataTable(sql);
            DataTable dtCopy = dt.Copy();

            dtCopy.TableName = "QTXX";
            return(dtCopy);
        }
예제 #16
0
        internal DataTable GetQLRByFSLBH(string slbh)
        {
            string sql = @"select distinct qlr.qlrmc from dj_qlr qlr
left join dj_qlrgl qlrgl on qlrgl.qlrid=qlr.qlrid
left join dj_xgdjgl djgl on djgl.fslbh=qlrgl.slbh
where djgl.zslbh='{0}' and qlrgl.qlrlx='权利人'";

            sql = string.Format(sql, slbh);
            return(OleDBHelper.GetDataTable(sql));
        }
예제 #17
0
        /// <summary>
        /// 领证信息权证编号信息
        /// </summary>
        /// <param name="ywzh"></param>
        /// <returns></returns>
        public DataTable GetCLF_LZXX_QZBH(string ywzh)
        {
//            string sql = string.Format(@"select DJB.BDCZH AS QZBH FROM (SELECT * FROM  dj_xgdjgl WHERE BGLX='房屋变更') xgdjgl
//left join dj_djb djb on xgdjgl.zslbh=djb.slbh where xgdjgl.fslbh='{0}'", ywzh);
            string    sql    = string.Format("select * from CLF_LZXX_QZBH where ywzh='{0}'", ywzh);
            DataTable dt     = OleDBHelper.GetDataTable(sql);
            DataTable dtCopy = dt.Copy();

            dtCopy.TableName = "FZXX";
            return(dtCopy);
        }
예제 #18
0
        public DataSet GetRegistesByHouseId(string HouseId)
        {
            string  sql = string.Format(@"Select '权属' as RegistType,Count(1) as Times from DJ_TSGL Left join FC_H_QSDC on DJ_TSGL.TSTYBM=FC_H_QSDC.TSTYBM Where (DJ_TSGL.TSTYBM='{0}' or HSCID='{0}'  or HYCID='{0}') and nvl2(DJ_TSGL.Lifecycle,DJ_TSGL.Lifecycle,0)=0 and exists(Select 1 from DJ_DJB where DJ_TSGL.SLBH=DJ_DJB.SLBH)
                               union all Select '抵押' as RegistType,Count(1) as Times from DJ_TSGL Left join FC_H_QSDC on DJ_TSGL.TSTYBM=FC_H_QSDC.TSTYBM Where (DJ_TSGL.TSTYBM='{0}' or HSCID='{0}'  or HYCID='{0}') and nvl2(DJ_TSGL.Lifecycle,DJ_TSGL.Lifecycle,0)=0 and exists(Select 1 from DJ_Dy where DJ_TSGL.SLBH=DJ_Dy.SLBH)
                               union all Select '预告' as RegistType,Count(1) as Times from DJ_TSGL Left join FC_H_QSDC on DJ_TSGL.TSTYBM=FC_H_QSDC.TSTYBM Where (DJ_TSGL.TSTYBM='{0}' or HSCID='{0}'  or HYCID='{0}') and nvl2(DJ_TSGL.Lifecycle,DJ_TSGL.Lifecycle,0)=0 and exists(Select 1 from DJ_YG where DJ_TSGL.SLBH=DJ_YG.SLBH)
                               union all Select '查封' as RegistType,Count(1) as Times from DJ_TSGL Left join FC_H_QSDC on DJ_TSGL.TSTYBM=FC_H_QSDC.TSTYBM Where (DJ_TSGL.TSTYBM='{0}' or HSCID='{0}'  or HYCID='{0}') and nvl2(DJ_TSGL.Lifecycle,DJ_TSGL.Lifecycle,0)=0 and exists(Select 1 from DJ_CF where DJ_TSGL.SLBH=DJ_CF.SLBH)
", HouseId);
            DataSet ds  = OleDBHelper.GetDataSet(sql);

            return(ds);
        }
예제 #19
0
        internal DataTable getBDCDYH(string zid)
        {
            string sql = @"select tstybm as 不动产户ID,bdcdyh as 不动产单元号,zl as 坐落,ycjzmj as 预测建筑面积,yctnjzmj as 预测套内面积,jzmj as 实测建筑面积,tnjzmj as 实测套内面积,HSCID as 原实测ID,FJBM as 房间编码 from fc_h_qsdc
where lsztybm = '{0}' ";

            sql = string.Format(sql, zid);
            if (IsHasSQLInject(sql))
            {
                return(null);
            }
            return(OleDBHelper.GetDataTable(sql));
        }
예제 #20
0
        internal DataTable GetQLRFromBDC(string slbh)
        {
            string sql = @"select qlrgl.qlrlx 权利人类型,qlr.qlrmc 权利人姓名,qlr.zjlb 证件类型,qlr.zjhm 证件号码,qlr.dz 联系地址,qlr.dh 联系电话,qlrgl.gyfe 份额,qlr.frdbxm 法定代表人 from dj_qlr qlr
left join dj_qlrgl qlrgl on qlrgl.qlrid=qlr.qlrid
where qlrgl.slbh='{0}'";

            sql = string.Format(sql, slbh);
            if (IsHasSQLInject(sql))
            {
                return(null);
            }
            return(OleDBHelper.GetDataTable(sql));
        }
예제 #21
0
        internal DataTable getCFFromBDC(string hid)
        {
            string sql = @"SELECT DISTINCT ''被执行人,cfjg 执行人,cffw 执行项目,DJSJ 查封日期,NVL(CFQX,decode (ceil(TO_CHAR(CFJSSJ-CFQSSJ)/365),1,'1',2,'2',3,'3',null)) 查封期限,BGRQ 解封录入日期,''备注 ,CFYY  查封信息, DJ_XGDJZX.DJYY 解封信息
FROM DJ_CF left join dj_XGDJGL ON DJ_CF.SLBH=DJ_XGDJGL.FSLBH LEFT JOIN DJ_XGDJZX ON DJ_XGDJGL.ZSLBH=DJ_XGDJZX.SLBH 
left join dj_tsgl tsgl on tsgl.slbh=dj_cf.slbh left join fc_h_qsdc h on h.tstybm=tsgl.tstybm 
Where h.tstybm = '{0}' or h.oracle_houseinfo_id = '{0}' or h.oracle_wb_houseid = '{0}' and tsgl.bdclx='房屋' ";

            sql = string.Format(sql, hid);
            if (IsHasSQLInject(sql))
            {
                return(null);
            }
            return(OleDBHelper.GetDataTable(sql));
        }
예제 #22
0
        internal DataTable GetQLRMCBySLBH(string slbh, string IsDYQR)
        {
            string qlrlx = IsDYQR;//? "抵押权人" : "抵押人";
            string sql   = @"select qlr.qlrmc from dj_qlr qlr
left join dj_qlrgl qlrgl on qlrgl.qlrid = qlr.qlrid
where qlrgl.slbh = '{0}' and qlrgl.qlrlx = '{1}'";

            sql = string.Format(sql, slbh, qlrlx);
            if (IsHasSQLInject(sql))
            {
                return(null);
            }
            return(OleDBHelper.GetDataTable(sql));
        }
예제 #23
0
        internal DataTable GetDYBDCDYH(string slbh)
        {
            string sql = @"select tsgl.bdcdyh from dj_dy dy
left join dj_tsgl tsgl on tsgl.slbh = dy.slbh
left join fc_h_qsdc h on tsgl.tstybm = h.tstybm
where dy.slbh = '{0}' ";

            sql = string.Format(sql, slbh);
            if (IsHasSQLInject(sql))
            {
                return(null);
            }
            return(OleDBHelper.GetDataTable(sql));
        }
예제 #24
0
        internal DataTable GetCFInfoFromBDC(string hoID)
        {
            string sql = @"select cf.cfjg 执行法院,cf.cfwh 协助执行书号,cf.cfqssj 查封日期,NVL(cf.CFQX,decode (ceil(TO_CHAR(cf.CFJSSJ-cf.CFQSSJ)/365),1,'1',2,'2',3,'3',null)) 查封期限,cf.cfyy 查封原因 from dj_cf cf 
left join  dj_tsgl tsgl on cf.slbh = tsgl.slbh
left join fc_h_qsdc h on h.tstybm = tsgl.tstybm
where h.tstybm = '{0}' or h.ORACLE_HOUSEINFO_ID = '{0}' or h.ORACLE_WB_HOUSEID = '{0}'  and tsgl.bdclx='房屋'";

            sql = string.Format(sql, hoID);
            if (IsHasSQLInject(sql))
            {
                return(null);
            }
            return(OleDBHelper.GetDataTable(sql));
        }
예제 #25
0
        internal DataTable GetQLRZJHMBySLBH(string slbh, string isDyqr)
        {
            string sql = @"select qlr.zjhm from dj_djb djb
left join dj_qlrgl gl on gl.slbh=djb.slbh
left join dj_qlr qlr on qlr.qlrid=gl.qlrid
where djb.slbh='{0}' and gl.qlrlx='{1}'";

            sql = string.Format(sql, slbh, isDyqr);

            if (IsHasSQLInject(sql))
            {
                return(null);
            }
            return(OleDBHelper.GetDataTable(sql));
        }
예제 #26
0
        internal DataTable GetFZFromBDC(string hID)
        {
            string sql = @"select z.fwzl 项目坐落,z.xmmc 项目名称,z.jzwmc 楼盘名称,h.dyh 单元号,h.fjh 房间号,h.jzmj 建筑面积,fwjg.itemname 结构,ghyt.ytmc 用途,z.jcnf 建成年代,z.zcs 总层数,h.sjc 所在层数,h.bdcdyh as 不动产单元号,nvl(h.FTTDMJ,h.DYTDMJ) as 土地面积 ,'' as 土地取得方式 from fc_h_qsdc h
left join fc_z_qsdc z on h.lsztybm = z.tstybm
left join dic_item@xzbdcggk fwjg on fwjg.itemval=z.fwjg and fwjg.diccode='1505181711115COR1KAPMB'
left join DIC_FWYTLX@Xzbdcggk ghyt on ghyt.ytbm=h.ghyt
where h.tstybm = '{0}' or h.oracle_houseinfo_id = '{0}' or h.oracle_wb_houseid = '{0}'";

            sql = string.Format(sql, hID);
            if (IsHasSQLInject(sql))
            {
                return(null);
            }
            return(OleDBHelper.GetDataTable(sql));
        }
예제 #27
0
        internal DataTable GetDYZL(string slbh)
        {
//            string sql = @"select h.zl from dj_dy dy
//left join dj_tsgl tsgl on tsgl.slbh = dy.slbh
//left join fc_h_qsdc h on tsgl.tstybm = h.tstybm
//where dy.slbh = '{0}' ";

            string sql = @"select sjd.zl from dj_sjd sjd where sjd.slbh='{0}'";

            sql = string.Format(sql, slbh);
            if (IsHasSQLInject(sql))
            {
                return(null);
            }
            return(OleDBHelper.GetDataTable(sql));
        }
예제 #28
0
        /// <summary>
        /// 根据buildingId检查这个一栋房子是否有房屋做过登记
        /// </summary>
        /// <param name="buildingId"></param>
        /// <returns>true 表示做过登记</returns>
        public bool GetIsRegistedBuilding(string buildingId)
        {
            //string sql = string.Format("select count(1) from dj_tsgl gl left join fc_h_qsdc h on gl.tstybm=h.tstybm where h.lsztybm='{0}'", buildingId);
            //string sql2= string.Format("select count(1) from dj_tsgl gl left join fc_z_qsdc z on gl.tstybm=z.tstybm where z.tstybm='{0}'", buildingId);
            //int rowCount = OleDBHelper.GetScalar(sql);
            //if (rowCount == 0)
            //{
            //   int ret2=  OleDBHelper.GetScalar(sql2);
            //   return ret2>0;
            //}

            string sql      = string.Format(@"Select Count(1) From DJ_TSGL 
Left Join FC_H_QSDC on DJ_TSGL.TSTYBM=FC_H_QSDC.TSTYBM 
Left Join FC_Z_QSDC on FC_H_QSDC.LSZTYBM=FC_Z_QSDC.TSTYBM Where Nvl2(DJ_TSGL.LifeCycle,DJ_TSGL.LifeCycle,0)=0 And FC_Z_QSDC.TSTYBM='{0}'", buildingId);
            int    rowCount = OleDBHelper.GetScalar(sql);

            return(true);
        }
예제 #29
0
        internal DataTable GetQSInfoFromBDC(string slbh)
        {
            string sql = @"select djb.slbh 业务ID,djb.slbh 自然状况登记簿ID,nvl(nvl(h.oracle_wb_houseid,h.oracle_houseinfo_id),h.tstybm) 房屋ID,djb.slbh 业务宗号,2 as 状态,qm.qm 行政区,fwytlx.ytmc 产别,'' as 来源,h.zl 房屋坐落,
item.itemname 共有性质,djb.djlx 登记类型,djb.djyy 业务种类,djb.bdczh 所有权证号,djb.zsxlh 证书印刷号,djb.djrq 登簿时间 
 from dj_djb djb
left join dj_tsgl tsgl on tsgl.slbh = djb.slbh
left join fc_h_qsdc h on h.tstybm = tsgl.tstybm
left join dic_fwytlx@xzbdcggk fwytlx on fwytlx.ytbm=h.Ghyt
LEFT JOIN dic_item@xzbdcggk item on item.itemval=djb.gyfs and item.diccode='150106151438XH6KL22QEP'
left join fc_qm qm on qm.id=h.qm
where djb.slbh = '{0}' and tsgl.bdclx='房屋' ";

            sql = string.Format(sql, slbh);
            if (IsHasSQLInject(sql))
            {
                return(null);
            }
            return(OleDBHelper.GetDataTable(sql));
        }
예제 #30
0
        internal DataTable getCertInfoFromBDC(string strBusNo, string stringstrCertCode)
        {
            string sql = @"select slbh 抵押业务宗号, bdczmh 不动产证明号,'苏'  不动产证明省份,'徐州市' 不动产证明市级,FZND 不动产证明年份,bdczmh 不动产证明序号,'抵押权' as 证明权利或事项,qt 其他,fj 附记,djrq 登簿日期,zsxlh 证书印刷号,DYLX AS LX,BDCDJ.f_ParseDic('预告登记种类',YGDJZL) AS YGDJZL from dj_dy 
where 1=1  ";

            if (!string.IsNullOrEmpty(strBusNo))
            {
                sql += string.Format(" and dj_dy.slbh = '{0}'", strBusNo);
            }
            if (!string.IsNullOrEmpty(stringstrCertCode))
            {
                sql += string.Format(" and bdczmh = '{0}'", stringstrCertCode);
            }
            if (IsHasSQLInject(sql))
            {
                return(null);
            }
            return(OleDBHelper.GetDataTable(sql));
        }