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); } }
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; }
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); }
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; } }