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

📄 dataservice.cs

📁 中国文章系统数据库设计, 数据库设计.
💻 CS
📖 第 1 页 / 共 3 页
字号:
		public bool sublot_set(string usertoken, DataSet mDataSet)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);
			//要对DataSet进行校验
			DataEngine DE = new DataEngine();
			int flag = DE.save_database(mDataSet, "BaseD_sublot");
			if (flag == 1)
			{
				return true;
			}
			return false;
		}

		[WebMethod(Description = "查询“小班树种清单”,返回满足条件的小班树种清单信息。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet sublot_more_getlist1(string usertoken, string strID)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);
			//生成查询条件
			string strCom = "SELECT * FROM BaseD_sublot_more";
			if (strID != "") strCom = "SELECT * FROM BaseD_sublot_more where idclient ='" + strID + "'";
			DataEngine DE = new DataEngine();
			return DE.query_database(strCom, "BaseD_sublot_more");
		}

		[WebMethod(Description = "查询“小班树种信息”,返回一条小班树种信息。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet sublot_more_getinfo(string usertoken, string strID, string strTree)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);
			//生成查询条件
			string strCom = " SELECT * FROM BaseD_sublot_more";
			if (strID != "" && strTree != "")
				strCom = " SELECT * FROM BaseD_sublot_more where idclient ='" + strID + "' and tree= '" + strTree + "'";
			else return null;
			DataEngine DE = new DataEngine();
			return DE.query_database(strCom, "BaseD_sublot_more");
		}

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

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

		[WebMethod(Description = "保存“树种信息”的数据。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public bool sublot_more_set(string usertoken, DataSet mDataSet)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);
			//要对DataSet进行校验
			DataEngine DE = new DataEngine();
			int falg = DE.save_database(mDataSet, "BaseD_sublot_more");
			if (falg == 1)
			{
				return true;
			}
			return false;
		}
		#endregion

		#region 图上操作:根据行政区划获得小班数据。
		[WebMethod(Description = "图上操作:根据行政区划获得远程服务的地区数据。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet MapGetAreaByCode(string usertoken, string areaCode)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);
			if (areaCode.Equals(""))
			{
				return null;
			}
			else
			{
				string strCom = "SELECT code,name,area_class,x,y,mapdata FROM admini_area" +
					" where code like '" + areaCode + "%' and (mapdata is not null or (x>'0.0' and y>'0.0'))";
				DataEngine DE = new DataEngine();
				DataSet ds = DE.query_database(strCom, "admini_area");
				return ds;
			}
		}

		[WebMethod(Description = "图上操作:根据行政区划获得小班数据。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet MapGetXiaoBanByCode(string usertoken,string strRgnCode,string strXiangRgnCode)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);
			string strCom;
			if (strXiangRgnCode == "")
				return null;
			else
				strCom = "SELECT * FROM based_sublot_space WHERE towncode LIKE '" + strXiangRgnCode + "%'";
			DataEngine
				DE = new DataEngine();
			DataSet ds = DE.query_database(strCom, "based_sublot_space");
			return ds;
		}
		
		[WebMethod(Description = "图上操作:根据行政区划获得小班数据。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public bool MapSublot_Set(string usertoken, DataSet mDataSet)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);
			DataEngine DE = new DataEngine();
			int falg = DE.save_database(mDataSet, "BaseD_sublot_space");
			if (falg == 1)
			{
				return true;
			}
			return false;
		}

		[WebMethod(Description = "在空间信息中查询“小班编号”,返回一条小班空间信息。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet sublot_getinfoFromMap(string usertoken, string id)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);
			
			//生成查询条件
			string strCom;
			if (id != "") strCom = " SELECT * FROM BaseD_sublot_space where idclient = '" + id + "' and mapdata is not null and mapdata<>''";
			else return null;
			DataEngine DE = new DataEngine();
			return DE.query_database(strCom, "BaseD_sublot_space");
		}
		[WebMethod(Description = "查询“小班地图数据”,返回一条小班地图数据。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet sublotMap_getinfo(string usertoken, string id)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);

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

		[WebMethod(Description = "查询“乡级行政区划”,返回满足条件的行政区划信息。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet xiangzhen_admini_area_getlist(string usertoken, string strRgnCode)
		{
			////if (Authentication == null)
				//////throw new AuthenticationException(AuthenticationReason.Unlogin);
			
			string strCom = "SELECT * FROM admini_area WHERE code LIKE '" + strRgnCode + "%' AND area_class='4'";
			DataEngine DE = new DataEngine();
			DataSet ds = DE.query_database(strCom, "admini_area");
			return ds;
		}

		[WebMethod(Description = "图上操作:根据行政区划获得小班数据。区县代码,乡镇名称")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet MapGetXiaoBanByCode2(string usertoken,string strRgnCode,string strVill)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);
			string strCom;
			if (strRgnCode == "")
				return null;
			else
				strCom = "SELECT * FROM based_sublot_space WHERE towncode ='" + strRgnCode + "' ";
			if ( strVill!="")
				strCom +="and idclient like '"+strVill+"-%'";
			DataEngine DE = new DataEngine();
			DataSet ds = DE.query_database(strCom, "based_sublot_space");
			return ds;
		}

		/* 
		 *********************************** 原图管理 ************************************************************************
		 * 开始
		 */
		/*************************************************************************************************/
		//从ys_ID的相应项目中获得最大的项目ID
		[WebMethod(Description = "获得某项目的最大的项目ID。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public long GetMaxID(string usertoken, string strItem)
		{
			//if (Authentication == null)
				////throw new AuthenticationException(AuthenticationReason.Unlogin);
			

			return 0;
		}
		
		[WebMethod(Description = "查询“原图”,返回满足条件的原图列表。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet mapOrigin_getlist(string usertoken, string strMapType, string strFieldName, string strFilterIFValue,string strRGN)
		{
			//生成查询条件
			//if (strFieldName == "" || strFilterIFValue == "") return null;
			string strCom = null;
			if (strMapType != "") strMapType = " and maptype='" + strMapType+"' ";
			strCom = "SELECT * FROM BaseD_MapOrigin where " + strFieldName + " like '" + strFilterIFValue + "%' and RGNCode like '"+ strRGN+"%' ";
			strCom += strMapType;
			DataEngine DE = new DataEngine();
			return DE.query_database(strCom, "BaseD_MapOrigin");
		}

		[WebMethod(Description = "查询“原图信息”,返回一条原图信息。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public DataSet mapOrigin_getinfo(string usertoken, string id)
		{
			//生成查询条件
			string strCom = " SELECT * FROM BaseD_MapOrigin";
			if (id != "") strCom = " SELECT * FROM BaseD_MapOrigin where idclient = '" + id + "'";

			DataEngine DE = new DataEngine();
			return DE.query_database(strCom, "BaseD_MapOrigin");
		}


		[WebMethod(Description = "请求“删除数据”。成功返回真,失败返回假。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public bool mapOrigin_delInfo(string id)
		{
			//要对DataSet进行校验

			DataEngine DE = new DataEngine();
			return DE.del_database("idclient", id, "BaseD_MapOrigin");
		}

		
		[WebMethod(Description = "保存“原图”的数据。")]
		[SoapHeader("Authentication", Direction = SoapHeaderDirection.In)]
		public bool mapOrigin_set(string usertoken, DataSet mDataSet)
		{
			//要对DataSet进行校验
			DataEngine DE = new DataEngine();
			int flag = DE.save_database(mDataSet, "BaseD_MapOrigin");
			if (flag == 1)
			{
				return true;
			}
			return false;
		}
		// 图管理 结束 *********************************** 

		#endregion

		#endregion
	}
}

⌨️ 快捷键说明

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