public static MTable getBkList(WindAPI w, string sec, DateTime dt, bool FilterTheNoPrice) { SecIndexClass sic = new SecIndexClass(sec); secIndexBuilder sib = new secIndexBuilder(w, sic); MTable mt = sib.getBkList(dt); if (mt == null || mt.Count == 0) { return(mt); } BaseDataProcess_ForWD bdp = new BaseDataProcess_ForWD(w); string[] seccodes = mt["wind_code"].ToList <string>().ToArray(); RunResultClass rc = bdp.getSetDataResult(seccodes, "close", dt); MTable ret = new MTable(); List <DataRow> NewDrs = new List <DataRow>(); for (int i = 0; i < rc.Result.Count; i++) { DataRow retdr = mt.GetTable().Rows[i]; DataRow dr = rc.Result.GetTable().Rows[i]; if (dr.IsNull("CLOSE") && FilterTheNoPrice) { continue; } NewDrs.Add(retdr); } ret.FillList(NewDrs.ToArray()); return(ret); }
public static bool IsSecIndex(WindAPI w, string strName, DateTime EndT, out string[] seclist, out string[] secnames) { seclist = new string[0]; secnames = new string[0]; if (strName == null || strName.Trim().Length == 0) { return(false); } SecIndexClass sic = new SecIndexClass(strName); secIndexBuilder sib = new secIndexBuilder(w, sic); MTable mtb = sib.getBkList(EndT); if (mtb.Count == 0) { return(false); } //throw (new Exception(mtb.ToRowData(0))); seclist = mtb.ToList <string>("wind_code").ToArray(); secnames = mtb.ToList <string>("sec_name").ToArray(); return(true); }