Esempio n. 1
0
        public static Litbang GetLitbang(int Id)
        {
            Litbang Litbang = new Litbang();

            try
            {
                using (var dc = new PinereDataContext(PinereConstant.PinereConnectionString))
                {
                    Litbang = (from a in dc.GetDataLitbang(Id)
                               select new Litbang
                    {
                        Id = a.Id,
                        PasienId = a.PasienId.Value.ToString(),
                        TanggalPeriksaLab = GetDateStringFromDate(a.Tanggal_periksa_lab),
                        HasilLab = a.Hasil_lab,
                        Keterangan = a.Keterangan,
                        Attachment = a.Attachment,
                        TanggalTerimaSampel = GetDateStringFromDate(a.Tanggal_terima_sampel)
                    }).SingleOrDefault();
                    if (Litbang == null)
                    {
                        Litbang = new Litbang();
                    }
                }
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
            return(Litbang);
        }
Esempio n. 2
0
 public PinereDataModel()
 {
     DataAirline = new DataAirline();
     Pasien      = new Pasien();
     KKP         = new KKP();
     Sampel      = new Sampel();
     Litbang     = new Litbang();
 }
Esempio n. 3
0
 public static Boolean SaveDataLitbang(PinereDataContext dc, string User, Litbang lb, int PasienId)
 {
     try
     {
         dc.InsertDataLitbang(lb.Id, PasienId, GetDateFromStringDate(lb.TanggalPeriksaLab), lb.HasilLab, lb.Keterangan, lb.Attachment, DateTime.Now, User, GetDateFromStringDate(lb.TanggalTerimaSampel));
         return(true);
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }