Example #1
0
        public async Task GetDoctorsByDeptCount(int dept, int hosp_id, IDoctorCountByDeptCallback callback)
        {
            if (DBHandler.db == null)
            {
                DBHandler.DBConnection();
            }
            var count = await DBHandler.db.ExecuteScalarAsync <int>(String.Format("select count(*) from roster group by DOC_ID " +
                                                                                  "having DOC_ID in " +
                                                                                  "(select id from DOCTOR where DEPT_ID={0}) " +
                                                                                  "and HOSP_ID={1}", dept, hosp_id)
                                                                    );

            if (count > 0)
            {
                callback.ReadCountSuccess(count);
            }
            else
            {
                callback.ReadCountFail();
            }
        }
Example #2
0
 public Task GetDoctorCountAsync(int dept, int hosp_id, IDoctorCountByDeptCallback callback)
 {
     throw new NotImplementedException();
 }