Exemplo n.º 1
0
        public static string GeneratePatientId()
        {
            var pmisentity = new PMISEntities();

            int id = 0;

            try
            {
                var seriesparam = new SqlParameter()
                {
                    ParameterName = "series",
                    DbType        = DbType.Int32,
                    Direction     = ParameterDirection.Output
                };

                var seriesId = pmisentity.Database.SqlQuery <int>("exec Generate_PatCode @series out", seriesparam)
                               .FirstOrDefault();

                id = Convert.ToInt32(seriesId);
            }
            catch (NullReferenceException)
            {
                id += 1;
            }
            catch (FormatException)
            {
                id += 1;
            }

            return(string.Format("{0:000000}", id));
        }
Exemplo n.º 2
0
        //public PatientServices()
        //{
        //    _pmisEntities=new PMISEntities();
        //}

        public PatientServices(PMISEntities pmisEntities)
        {
            this._pmisEntities = pmisEntities;
        }
Exemplo n.º 3
0
 public UserPhysicianService(PMISEntities pmisEntities)
 {
     this._pmisEntities = pmisEntities;
 }
Exemplo n.º 4
0
 //public UnitOfWork()
 //{
 //    _pmisEntities=new PMISEntities();
 //}
 public UnitOfWork(PMISEntities pmisEntities)
 {
     this._pmisEntities = pmisEntities;
 }
Exemplo n.º 5
0
 public PhycisianServices(PMISEntities pmisEntities)
 {
     this._pmisEntities = pmisEntities;
 }
Exemplo n.º 6
0
 public PrescriptionServices(PMISEntities pmisEntities)
 {
     _pmisEntities = pmisEntities;
 }
Exemplo n.º 7
0
        //public AppointmentServices()
        //{
        //    _pmisEntities = new PMISEntities();
        //    _phycisianService = new PhycisianServices();
        //    _patientservice = new PatientServices();
        //}

        public AppointmentServices(PMISEntities pmisEntities, IUserPhysicianService userPhysicianService, IPatientServices patientServices1)
        {
            this._pmisEntities    = pmisEntities;
            _userPhysicianService = userPhysicianService;
            _patientServices      = patientServices1;
        }