コード例 #1
0
        /// <summary>
        /// 根据传入where条件获取风速记录
        /// </summary>
        /// <param name="where"></param>
        /// <returns></returns>
        public static lsDatFengSu FengSuRecord(string where)
        {
            string      strSql   = "select (select nStandardMinute from TAB_HandleStep where a.strStepID=strID) as nStandardMinute, a.LocoType,a.LocoNum,a.FenLei,a.banci,a.celiangriqi,a.celiangren,a.buwei,a.strID,a.strStepID,a.JiCheID,a.nState,a.nSstate,a.nCheckCount,a.nIsQualified,a.nFinalIsQualified,a.dian1,a.dian2,a.dian3,a.dian4,a.dian5,a.dian6,a.dian7,a.pingjun,(select min(dtBeginTime) from lsDatFengSu where 1=1 " + where + ")as dtBeginTime,(select max(dtEndTime) from lsDatFengSu where 1=1 " + where + ")as dtEndTime from lsDatFengSu a where 1=1 " + where;
            DataTable   dtFengSu = SqlHelper.ExecuteDataset(searchmaster.GetSqlConnConfig("57"), CommandType.Text, strSql).Tables[0];
            lsDatFengSu FengSu   = new lsDatFengSu();

            return(SetValue(FengSu, dtFengSu.Rows[0]));
        }
コード例 #2
0
 public static lsDatFengSu SetValue(lsDatFengSu FengSu, DataRow dr)
 {
     if (dr != null)
     {
         FengSu.LocoType    = dr["LocoType"].ToString();
         FengSu.LocoNum     = dr["LocoNum"].ToString();
         FengSu.FenLei      = dr["FenLei"].ToString();
         FengSu.banci       = dr["banci"].ToString();
         FengSu.buwei       = dr["buwei"].ToString();
         FengSu.celiangriqi = PageBase.static_ext_date(dr["celiangriqi"].ToString());
         FengSu.dian1       = PageBase.static_ext_decimal(dr["dian1"].ToString());
         FengSu.dian2       = PageBase.static_ext_decimal(dr["dian2"].ToString());
         FengSu.dian3       = PageBase.static_ext_decimal(dr["dian3"].ToString());
         FengSu.dian4       = PageBase.static_ext_decimal(dr["dian4"].ToString());
         FengSu.dian5       = PageBase.static_ext_decimal(dr["dian5"].ToString());
         FengSu.dian6       = PageBase.static_ext_decimal(dr["dian6"].ToString());
         FengSu.dian7       = PageBase.static_ext_decimal(dr["dian7"].ToString());
         FengSu.pingjun     = PageBase.static_ext_int(dr["pingjun"].ToString());
         FengSu.celiangren  = dr["celiangren"].ToString();
         //FengSu.GovernUnitId = PageBase.static_ext_int(dr["GovernUnitId"].ToString());
         //FengSu.UnitId = PageBase.static_ext_int(dr["UnitId"].ToString());
         //FengSu.DepartmentId = PageBase.static_ext_int(dr["DepartmentId"].ToString());
         //FengSu.ApanageId = PageBase.static_ext_int(dr["ApanageId"].ToString());
         FengSu.strStepID       = dr["strStepID"].ToString();
         FengSu.JiCheID         = PageBase.static_ext_int(dr["JiCheID"].ToString());
         FengSu.dtBeginTime     = PageBase.static_ext_date(dr["dtBeginTime"].ToString());
         FengSu.strID           = dr["strID"].ToString();
         FengSu.dtEndTime       = PageBase.static_ext_date(dr["dtEndTime"].ToString());
         FengSu.nState          = PageBase.static_ext_int(dr["nState"].ToString());
         FengSu.nSstate         = PageBase.static_ext_int(dr["nSstate"].ToString());
         FengSu.nCheckCount     = PageBase.static_ext_int(dr["nCheckCount"].ToString());
         FengSu.nIsQualified    = PageBase.static_ext_int(dr["nFinalIsQualified"].ToString());
         FengSu.nStandardMinute = PageBase.static_ext_int(dr["nStandardMinute"].ToString());
     }
     return(FengSu);
 }