Esempio n. 1
0
 private bool DoSelect()
 {
     TPumpStationInfo pumpinfo = new TPumpStationInfo(_dbpath, PassWord);
     ListPump = pumpinfo.Sel_PumpStationInfo(PumpName);
     if (ListPump == null || ListPump.Count <= 0)
         return false;
     else
         return true;
 }
Esempio n. 2
0
        private bool DoLoad()
        {
            TPumpStationInfo pumpinfo = new TPumpStationInfo(_dbpath, PassWord);

            ListPump = pumpinfo.Load_PumpStationInfo();

            if (ListPump == null || ListPump.Count <= 0)
                return false;

            return true;
        }
Esempio n. 3
0
 private bool DoInsert()
 {
     if (ListPump == null)
         return false;
     TPumpStationInfo pumpinfo = new TPumpStationInfo(_dbpath, PassWord);
     int i = 0;
     foreach (CPumpStationInfo pump in ListPump)
     {
         CPumpStationInfo tmp = pump;
         if(pumpinfo.Insert_PumpStationInfo(ref tmp))
             i++;
     }
     if (i <= 0)
         return false;
     else
         return true;
 }
Esempio n. 4
0
 private bool DoUpdate()
 {
     TPumpStationInfo pumpinfo = new TPumpStationInfo(_dbpath, PassWord);
     bool b = pumpinfo.Update_PumpStationInfo(ListPump);
     return b;
 }
Esempio n. 5
0
 private bool DoClear()
 {
     TPumpStationInfo pumpinfo = new TPumpStationInfo(_dbpath, PassWord);
     return pumpinfo.Clear_PumpStationInfo();
 }
Esempio n. 6
0
 private bool DoDelete()
 {
     TPumpStationInfo pumpinfo = new TPumpStationInfo(_dbpath, PassWord);
     int i = 0;
     foreach (CPumpStationInfo pump in ListPump)
     {
         if (pumpinfo.Delete_PumpStationInfo(pump))
             i++;
     }
     if (i <= 0)
         return false;
     else
         return true;
 }