⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dataservice.cs

📁 中国文章系统数据库设计, 数据库设计.
💻 CS
📖 第 1 页 / 共 3 页
字号:
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);
			string strCom;
			if (id != "") strCom = " SELECT * FROM admini_area where code = '" + id + "' and mapdata is not null and mapdata<>''";
			else return null;
			DataEngine de = new DataEngine();
			return de.query_database(strCom, "admini_area");
		}

		#endregion

		#region 机构信息
		[WebMethod(Description = "查询“机构信息”,返回满足条件信息。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet trans_quar_org_getlist(string strQuery)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);

			//生成查询条件
			string strCom = "SELECT * FROM quar_org";
			if (strQuery != "")
				strCom = "SELECT * FROM quar_org where orgsname like '%" + strQuery + "%'";
			DataEngine de = new DataEngine();
			return de.query_database(strCom, "quar_org");
		}

		[WebMethod(Description = "查询“指定idclient机构信息”,返回满足条件信息。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet trans_quar_org_get(string strQuery)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);

			//生成查询条件
			string strCom = "SELECT * FROM quar_org";
			if (strQuery != "")
				strCom = "SELECT * FROM quar_org where idclient=" + strQuery;
			DataEngine de = new DataEngine();
			return de.query_database(strCom, "quar_org");
		}

		[WebMethod(Description = "保存“机构信息”,返回调出地是否收到的响应结果。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public string trans_quar_org_set(DataSet mDataSet)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);

			//要对DataSet进行校验
			DataEngine de = new DataEngine();
			de.save_database(mDataSet, "quar_org");
			return "ok";
		}

		[WebMethod(Description = "删除“机构信息”,返回调出地是否收到的响应结果。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public string trans_quar_org_del(string strFileName, string strValue)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);

			//要对DataSet进行校验
			DataEngine de = new DataEngine();
			de.del_database(strFileName, strValue, "quar_org");
			return "ok";
		}
		#endregion

        #region 树种
        [WebMethod(Description = "查询“树种”,返回满足条件的行政区划信息。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet sublot_tree_getlist(string usertoken, string strRgnCode)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);

            string strCom = "SELECT distinct(tree) FROM BaseD_sublot_more";
			DataEngine DE = new DataEngine();
			DataSet ds = DE.query_database(strCom, "BaseD_sublot_more");
			return ds;
		}
        #endregion
        

        #region 行政区划第二版本

        [WebMethod(Description = "查询“行政区划”,返回满足条件的行政区划信息。")]
        [SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
        public DataSet getlist_rgn(string strCom, string nLevel)
        {
            //if (Authentication == null)
                ////throw new AuthenticationException(AuthenticationReason.Unlogin);
            if (strCom == null)
                strCom = "select * from rgn where rgn_level='1'";

            DataEngine de = new DataEngine();
            return de.query_database(strCom, "rgn");
        }

        [WebMethod(Description = "请求“删除数据”。成功返回真,失败返回假。")]
        [SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
        public bool rgn_sys_delinfo(string rgncode)
        {
            //if (Authentication == null)
                ////throw new AuthenticationException(AuthenticationReason.Unlogin);

            DataEngine de = new DataEngine();
            rgncode = "'" + rgncode + "'";
            return de.del_database("rgn_code", rgncode, "rgn");
        }

        [WebMethod(Description = "查询“networking”。 获得上传表一条记录 或空记录")]
        [SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
        public DataSet get_NetWorkingInfo(string strFieldName, string strFiledValue, string strTableName)
        {
            //if (Authentication == null)
                ////throw new AuthenticationException(AuthenticationReason.Unlogin);

            string strCom;
            if (strFieldName.Equals("") || strFiledValue.Equals("") || strTableName.Equals(""))
            {
                strCom = "select * from networking where idclient is null";
            }
            else
            {
                strCom = "select * from networking where tablename='" + strTableName + "' and fieldname='" + strFieldName + "' and recordID='" + strFiledValue + "'";
            }
            DataEngine de = new DataEngine();
            return de.query_database(strCom, "networking");
        }

        [WebMethod(Description = "查询“networking”。 保存要上传的数据到本地数据库")]
        [SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
        public bool set_NetWorkingInfo(DataSet mDataSet)
        {
            //if (Authentication == null)
                ////throw new AuthenticationException(AuthenticationReason.Unlogin);

            DataEngine DE = new DataEngine();
            int flag = DE.save_database(mDataSet, "networking");
            if (flag == 1)
            {
                return true;
            }
            return false;
        }

        [WebMethod(Description = "rgn_save_database。 保存要上传的数据到本地数据库")]
        [SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
        public bool rgn_save_database(DataSet mDataSet)
        {
            //if (Authentication == null)
                ////throw new AuthenticationException(AuthenticationReason.Unlogin);

            DataEngine DE = new DataEngine();
            int flag = DE.save_database(mDataSet, "rgn");
            if (flag == 1)
            {
                return true;
            }
            return false;
        }

        [WebMethod(Description = "查询“行政区划”,返回满足条件的行政区划信息。")]
        public DataSet rgn_sys_getlist1(string usertoken, string rgncode, string nLevel)
        {
            //if (Authentication == null)
                ////throw new AuthenticationException(AuthenticationReason.Unlogin);

            string strCom = "SELECT * FROM rgn";
            if (rgncode != "")
                strCom = "SELECT * FROM rgn where rgn_code like '" + rgncode + "%' and rgn_level='" + nLevel + "'";

            DataEngine de = new DataEngine();
            return de.query_database(strCom, "rgn");
        }


        #endregion


        #endregion


        #region 付春秋

        #endregion


        #region 杨理

        #region 小班处理(空间数据及属性数据)
        [WebMethod(Description = "查询“小班”,返回满足条件的小班列表。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet sublot_getlist(string usertoken, string strRgnCode, string strTreeName)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);
			//生成查询条件
			if (strRgnCode=="")return null;
			string strCom = "SELECT * FROM VBaseD_sublot";
			if (strRgnCode != "")
			{
				strCom = "SELECT * FROM VBaseD_sublot where rgncode ='" + strRgnCode + "'";
				if (strTreeName != "")
				{
					strCom += " and tree = '" + strTreeName + "'";
				}
			}
			else
			{
				if (strTreeName != "")
				{
					strCom = "SELECT * FROM VBaseD_sublot where tree = '" + strTreeName + "'";
				}
			}
			DataEngine DE = new DataEngine();
			return DE.query_database(strCom, "VBaseD_sublot");
		}
		[WebMethod(Description = "查询“小班”,返回满足条件的小班列表。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet sublot_getlist2(string usertoken, string strRgnCode,string strVill, string strTreeName)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);
			//生成查询条件
			if (strRgnCode=="")return null;
			string strCom = "SELECT * FROM VBaseD_sublot";

			strCom = "SELECT * FROM VBaseD_sublot where rgncode ='" + strRgnCode + "'";
			if (strTreeName != "")
			{
				strCom += " and tree = '" + strTreeName + "'";
			}
			if (strVill != "")
			{
				strCom += " and idclient like '" + strVill + "-%'";
			}
			DataEngine DE = new DataEngine();
			return DE.query_database(strCom, "VBaseD_sublot");
		}
		[WebMethod(Description = "查询“小班信息”,返回一条小班信息。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet sublot_getinfo(string usertoken, string id)
		{            //if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);
			
			//生成查询条件
			string strCom = " SELECT * FROM BaseD_sublot";
			if (id != "") strCom = " SELECT * FROM BaseD_sublot where idclient = '" + id + "'";
			DataEngine DE = new DataEngine();
			return DE.query_database(strCom, "BaseD_sublot");
		}


		[WebMethod(Description = "请求“删除数据”。成功返回真,失败返回假。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public bool sublot_delInfo(string id)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);
			//要对DataSet进行校验
			DataEngine DE = new DataEngine();
			return DE.del_database("idclient", id, "BaseD_sublot");
		}

		[WebMethod(Description = "保存“小班”的数据。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -