public void SaveHistDPListToGroup(List <EtyHistDataPoint> dpList, string grpName)
        {
            //This dpList contains EtyHistDataPoint with EntityKey already

//             EntityDAO entityDAO = new EntityDAO();
//
//             foreach (EtyHistDataPoint dp in dpList)
//             {
//                 string dpNameWithoutSuffix = "";
//                 if (dp.DPName.Contains(".Value"))
//                 {
//                     dpNameWithoutSuffix = dp.DPName.Remove(dp.DPName.Length - 6);
//                 }
//                 //use long, so if there is no entity found, return 0.
//                 //There is no entity which (pkey=0 and type is DataPoint)
//                 ulong entityKey = entityDAO.FindDataPointEtyKeyByName(dpNameWithoutSuffix);
//
//                 dp.PKey = entityKey;  //if not found in entity table, pkey=0
//
//             }

            HistDataPointDAO dpDAO = new HistDataPointDAO();

            //make it as a transaction
            dpDAO.SaveHistDPListToGrp(dpList, grpName);

            //dpDAO.DeleteAllHistDPInGrp(grpName);
            //dpDAO.InsertHistDPListToGrp(dpList, grpName); //if dp.pkey=0, insert null into this column,
        }
        public List <EtyHistDataPoint> GetHistDListByGrp(string grpName)
        {
            HistDataPointDAO dpDAO = new HistDataPointDAO();

            return(dpDAO.GetHistDPByCfgName(grpName));
        }
Exemplo n.º 3
0
        public void TestCreateHistDataPointDAO01()
        {
            HistDataPointDAO histDataPointDAO = CreateHistDataPointDAO01();

            Assert.IsNotNull(histDataPointDAO);
        }
Exemplo n.º 4
0
        public static HistDataPointDAO CreateHistDataPointDAO01()
        {
            HistDataPointDAO histDataPointDAO = new HistDataPointDAO();

            return(histDataPointDAO);
        }
Exemplo n.º 5
0
        public List <string> GetAllHistDPGrp()
        {
            HistDataPointDAO histDPDAO = new HistDataPointDAO();;

            return(histDPDAO.GetAllHistDPGrpNames());
        }
Exemplo n.º 6
0
 public void FixtureSetUp()
 {
     histDataPointDAO = new HistDataPointDAO();
     TestDBInit.openConn();
 }