/// <summary> /// 根据传入where条件获取风速记录 /// </summary> /// <param name="where"></param> /// <returns></returns> public static lsDatHuaBan HuaBanRecord(string where) { string strSql = "select (select nStandardMinute from TAB_HandleStep where a.strStepID=strID) as nStandardMinute,a.* from lsDatHuaBan a where 1=1 " + where; DataTable dtHuaBan = SqlHelper.ExecuteDataset(searchmaster.GetSqlConnConfig("57"), CommandType.Text, strSql).Tables[0]; lsDatHuaBan HuaBan = new lsDatHuaBan(); return(SetValue(HuaBan, dtHuaBan.Rows[0])); }
/// <summary> /// 结构体赋值 /// </summary> /// <param name="HuaBan"></param> /// <param name="dr"></param> /// <returns></returns> public static lsDatHuaBan SetValue(lsDatHuaBan HuaBan, DataRow dr) { if (dr != null) { HuaBan.LocoType = dr["LocoType"].ToString(); HuaBan.LocoNum = dr["LocoNum"].ToString(); HuaBan.FenLei = dr["FenLei"].ToString(); HuaBan.FenLei2 = dr["FenLei2"].ToString(); HuaBan.XingHao = dr["XingHao"].ToString(); HuaBan.buwei = dr["buwei"].ToString(); HuaBan.jianCeRiQi = PageBase.static_ext_date(dr["jianCeRiQi"].ToString()); HuaBan.houdu = PageBase.static_ext_decimal(dr["houdu"].ToString()); HuaBan.houdu2 = PageBase.static_ext_decimal(dr["houdu2"].ToString()); HuaBan.HouDu21 = PageBase.static_ext_decimal(dr["HouDu21"].ToString()); HuaBan.HouDu22 = PageBase.static_ext_decimal(dr["HouDu22"].ToString()); HuaBan.YaLi = PageBase.static_ext_decimal(dr["YaLi"].ToString()); HuaBan.ShengGong = PageBase.static_ext_decimal(dr["ShengGong"].ToString()); HuaBan.JiangGong = PageBase.static_ext_decimal(dr["JiangGong"].ToString()); HuaBan.YaLi2 = PageBase.static_ext_decimal(dr["YaLi2"].ToString()); HuaBan.ShengGong2 = PageBase.static_ext_decimal(dr["ShengGong2"].ToString()); HuaBan.JiangGong2 = PageBase.static_ext_decimal(dr["JiangGong2"].ToString()); HuaBan.jianCeRen = dr["jianCeRen"].ToString(); HuaBan.GovernUnitId = PageBase.static_ext_int(dr["GovernUnitId"].ToString()); HuaBan.UnitId = PageBase.static_ext_int(dr["UnitId"].ToString()); HuaBan.DepartmentId = PageBase.static_ext_int(dr["DepartmentId"].ToString()); HuaBan.ApanageId = PageBase.static_ext_int(dr["ApanageId"].ToString()); HuaBan.strStepID = dr["strStepID"].ToString(); HuaBan.JiCheID = PageBase.static_ext_int(dr["JiCheID"].ToString()); HuaBan.dtBeginTime = PageBase.static_ext_date(dr["dtBeginTime"].ToString()); HuaBan.strID = dr["strID"].ToString(); HuaBan.dtEndTime = PageBase.static_ext_date(dr["dtEndTime"].ToString()); HuaBan.nState = PageBase.static_ext_int(dr["nState"].ToString()); HuaBan.nIsQualified = PageBase.static_ext_int(dr["nIsQualified"].ToString()); HuaBan.nStandardMinute = PageBase.static_ext_int(dr["nStandardMinute"].ToString()); } return(HuaBan); }