using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Antu.Bdc.Model.ZRZY { /// <summary> /// 湿地 /// </summary> public class SD : ZRZYBase { /// <summary> /// 湿地斑块名称 /// </summary> public string BKMC { get; set; } /// <summary> /// 湿地斑块序号 /// </summary> public string BKXH { get; set; } /// <summary> /// 所属湿地区名称 /// </summary> public string SDQMC { get; set; } /// <summary> /// 类别 /// </summary> public string LB { get; set; } /// <summary> /// 类别名称 /// </summary> public string LBNAME { get; set; } /// <summary> /// 面积 /// </summary> public decimal? MJ { get; set; } /// <summary> /// 所属三级流域 /// </summary> public string SSSJLY { get; set; } /// <summary> /// 所属三级流域名称 /// </summary> public string SSSJLYNAME { get; set; } /// <summary> /// 平均海拔 /// </summary> public decimal? PJHB { get; set; } /// <summary> /// 水源补给状况 /// </summary> public string BJZK { get; set; } /// <summary> /// 水源补给状况名称 /// </summary> public string BJZKNAME { get; set; } /// <summary> /// 潮汐类型 /// </summary> public string CXLX { get; set; } /// <summary> /// 潮汐类型名称 /// </summary> public string CXLXNAME { get; set; } /// <summary> /// 盐度 /// </summary> public string YD { get; set; } /// <summary> /// 水温 /// </summary> public string SW { get; set; } /// <summary> /// 斑块区划因子 /// </summary> public string QHYZ { get; set; } /// <summary> /// 斑块区划因子名称 /// </summary> public string QHYZNAME { get; set; } /// <summary> /// 受威胁因子 /// </summary> public string SWXYZ { get; set; } /// <summary> /// 受威胁因子 /// </summary> public string SWXYZNAME { get; set; } /// <summary> /// 受威胁状况等级 /// </summary> public string SWXZK { get; set; } /// <summary> /// 受威胁状况等级名称 /// </summary> public string SWXZKNAME { get; set; } /// <summary> /// 质量 /// </summary> public string ZL { get; set; } /// <summary> /// 湿地型 /// </summary> public string SDX { get; set; } /// <summary> /// 湿地型名称 /// </summary> public string SDXNAME { get; set; } } /// <summary> /// 历史 /// </summary> public class LSSD:SD,Ils { /// <summary> /// 推送时间 /// </summary> public DateTime? TSSJ { get; set; } /// <summary> /// 推送人 /// </summary> public string TSR { get; set; } } }
///调用方法
toLS<LSSD>(djdy.DJDYH, "LS_ZRZY_SD", "ZRZY_SD");
/// <summary> /// 写历史表,删除现势表 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="djdyh"></param> /// <param name="AddTab">ls表</param> /// <param name="delTab">xs表</param> public void toLS<T>(string djdyh, string addTab, string delTab) where T : Ils { List<T> LS_List = _gdDataService.Query<T>("select * from " + delTab + " where DJDYBSM='" + djdyh + "'").ToList(); foreach (T ls in LS_List) { ls.TSR = comm.GetCurrentUserName(); ls.TSSJ = CommonBus.DateTimeNow(); _gdDataService.Insert(addTab, ls, true); _gdDataService.Delete(delTab, "BSM", ls); } }