Esempio n. 1
0
 public static int SaveHisDetail(ref HisDetail hd)
 {
     _context = new NCPDPContext(new DbContextOptionsBuilder <NCPDPContext>().Options);
     _context.HisDetails.Add(hd);
     _context.SaveChanges();
     return(hd.DetailID);
 }
Esempio n. 2
0
 public static int SaveHisHeader(HisHeader FH)
 {
     _context = new NCPDPContext(new DbContextOptionsBuilder <NCPDPContext>().Options);
     _context.HisHeaders.Add(FH);
     _context.SaveChanges();
     return(FH.FileID);
 }
Esempio n. 3
0
        public static void UpdateHisHeader(HisHeader hh)
        {
            _context = new NCPDPContext(new DbContextOptionsBuilder <NCPDPContext>().Options);
            HisHeader header = _context.HisHeaders.Find(hh.FileID);

            header.Total_Gross_Amount_Due   = hh.Total_Gross_Amount_Due;
            header.Total_Net_Amount_Due     = hh.Total_Net_Amount_Due;
            header.Total_Patient_Pay_Amount = hh.Total_Patient_Pay_Amount;
            header.Total_Record_Count       = hh.Total_Record_Count;
            _context.SaveChanges();
        }
Esempio n. 4
0
 public static void emptyTables()
 {
     _context = new NCPDPContext(new DbContextOptionsBuilder <NCPDPContext>().Options);
     _context.Database.ExecuteSqlCommand("if object_id('dbo.HisHeaders') is not null begin delete from HisCompound1;dbcc checkident('dbo.HisCompound1',reseed,0);delete from HisCompound2;dbcc checkident('dbo.HisCompound2',reseed,0);delete from HisDetails;dbcc checkident('dbo.HisDetails',reseed,0);delete from HisHeaders;dbcc checkident('dbo.HisHeaders',reseed,0);end");
 }
Esempio n. 5
0
 public static void SaveHisCompound2(ref HisCompound2 hc2)
 {
     _context = new NCPDPContext(new DbContextOptionsBuilder <NCPDPContext>().Options);
     _context.HisCompound2.Add(hc2);
     _context.SaveChanges();
 }