Exemple #1
0
 public BMS_DAL.DS.BMSDS.TVesselsDataTable GetVessel()
 {
     using (BMS_DAL.DS.BMSDSTableAdapters.TVesselsTableAdapter ta = new BMS_DAL.DS.BMSDSTableAdapters.TVesselsTableAdapter())
     {
         try
         {
             return(ta.GetData());
         }
         catch (Exception ex) { throw ex; }
     }
 }
Exemple #2
0
        public int UpdateVessel(BMS_DAL.DS.BMSDS.TVesselsDataTable dt)
        {
            int r = 0;

            if (dt.GetChanges() != null)
            {
                using (BMS_DAL.DS.BMSDSTableAdapters.TVesselsTableAdapter ta = new BMS_DAL.DS.BMSDSTableAdapters.TVesselsTableAdapter())
                {
                    r = ta.UpdateWithTrans(dt);
                }
            }
            return(r);
        }
Exemple #3
0
 static void GetData(object arg)
 {
     using (BMS_DAL.DS.BMSDSTableAdapters.TVesselsTableAdapter ta = new BMS_DAL.DS.BMSDSTableAdapters.TVesselsTableAdapter())
     {
         System.Diagnostics.Stopwatch stopWatch = new System.Diagnostics.Stopwatch();
         stopWatch.Start();
         string r = string.Empty;
         try
         {
             var dt = ta.GetData();
             r = string.Format("rows{0}", dt.Count);
         }
         catch (Exception ex) { r = ex.Message; }
         stopWatch.Stop();
         System.Console.WriteLine(string.Format("T:{0} {1} {2}", arg, r, stopWatch.ElapsedMilliseconds));
     }
 }