예제 #1
0
 public int MakeZyh()
 {
     try
     {
         using (LTSQL.DCCbhisDataContext db = new LTSQL.DCCbhisDataContext(_hisConn))
         {
             return(db.ExecuteQuery <int>("SELECT MAXVAL=ISNULL(MAX(RYH),0)+1 FROM RY").First());
         }
     }
     catch (System.Exception ex)
     {
         Console.WriteLine(ex.Message);
         return(-1);
     }
 }
예제 #2
0
파일: HisComponent.cs 프로젝트: sywymj/NCMS
 public IEnumerable<CDoctor> GetDoctors()
 {
     LTSQL.DCCbhisDataContext db = new LTSQL.DCCbhisDataContext(_hisConn);
     try
     {
         return (from b in db.ZG select new CDoctor {
         zgdm= b.ZGDM,
         zgmc=b.ZGXM,
         pym = b.PYM,
         zglb = (int)b.ZGLBDM,
         bm = new CDepart() { bmdm=(int)b.BMDM,bmmc=b.BM.BMMC}
         }).ToArray();
     }
     catch (System.Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
     return null;
 }
예제 #3
0
 public IEnumerable <CDoctor> GetDoctors()
 {
     LTSQL.DCCbhisDataContext db = new LTSQL.DCCbhisDataContext(_hisConn);
     try
     {
         return((from b in db.ZG select new CDoctor {
             zgdm = b.ZGDM,
             zgmc = b.ZGXM,
             pym = b.PYM,
             zglb = (int)b.ZGLBDM,
             bm = new CDepart()
             {
                 bmdm = (int)b.BMDM, bmmc = b.BM.BMMC
             }
         }).ToArray());
     }
     catch (System.Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
     return(null);
 }
예제 #4
0
파일: HisComponent.cs 프로젝트: sywymj/NCMS
 public int MakeZyh()
 {
     try
     {
         using (LTSQL.DCCbhisDataContext db = new LTSQL.DCCbhisDataContext(_hisConn))
         {
             return db.ExecuteQuery<int>("SELECT MAXVAL=ISNULL(MAX(RYH),0)+1 FROM RY").First();
         }
     }
     catch (System.Exception ex)
     {
         Console.WriteLine(ex.Message);
         return -1;
     }
 }