示例#1
0
 /// <summary>
 /// Method to call getLetterDetail stored procedure
 /// </summary>
 /// <param name="Id">Id of the required letter details</param>
 /// <returns>
 /// Returns the letter details corresponding to the given id
 /// </returns>
 public List <getLetterDetail_Results> GetLetterDetails(string Id)
 {
     try
     {
         using (HimLettersEntities entity = new HimLettersEntities())
         {
             return(entity.getLetterDetail(Convert.ToInt32(Id)).Select(pe => new getLetterDetail_Results
             {
                 Deficient_Day_Range_Start = pe.Deficient_Day_Range_Start,
                 Deficiencies_To_Include = pe.Deficiencies_To_Include,
                 Deficient_Day_Range_End = pe.Deficient_Day_Range_End,
                 Charts_To_Include = pe.Charts_To_Include,
                 Chart_On_Hold = pe.Chart_On_Hold,
                 Include_Visits = pe.Include_Visits,
                 Include_Documents = pe.Include_Documents,
                 Physicians_To_Include = pe.Physicians_To_Include
             }).ToList());
         }
     }
     catch (Exception ex1)
     {
         LetterDetailsException ex = new LetterDetailsException();
         ex.Title = "Error in ServiceLetterDetails";
         throw new FaultException(ex.Title);
     }
 }
 public List <getPass_Results> GetPassword(string Username)
 {
     using (HimLettersEntities entity = new HimLettersEntities())
     {
         return(entity.getPass(Username).Select(pe => new getPass_Results
         {
             Username = pe.Username,
             Password = pe.Password
         }).ToList());
     }
 }
示例#3
0
 /// <summary>
 /// Method to call getLetterTypeList stored procedure
 /// </summary>
 /// <param></param>
 /// <returns>
 /// Returns the Ids and Names of letter types
 /// </returns>
 public List <getLetterTypeList_Results> GetLetterTypeList()
 {
     try
     {
         using (HimLettersEntities entity = new HimLettersEntities())
         {
             return(entity.getLetterTypeList().Select(pe => new getLetterTypeList_Results
             {
                 Id = pe.Id,
                 Name = pe.Name
             }).ToList());
         };
     }
     catch (Exception ex1)
     {
         LetterTypeException ex = new LetterTypeException();
         ex.Title = "Error in ServiceLetterType";
         throw new FaultException(ex.Title);
     }
 }
示例#4
0
 /// <summary>
 /// Method to call getFacility stored procedure
 /// </summary>
 /// <param></param>
 /// <returns>
 /// Returns the Ids and Names of facilities
 /// </returns>
 public List <getFacility_Results> GetFacility()
 {
     try
     {
         using (HimLettersEntities entity = new HimLettersEntities())
         {
             return(entity.getFacility().Select(pe => new getFacility_Results
             {
                 Id = pe.Id,
                 Facility_Name = pe.Facility_Name
             }).ToList());
         }
     }
     catch (Exception ex1)
     {
         FacilityException ex = new FacilityException();
         ex.Title = "Error in ServiceFacility";
         throw new FaultException(ex.Title);
     }
 }
 /// <summary>
 /// Method to call getPhysiciansList stored procedure
 /// </summary>
 /// <param name="letterTypeId">Id of the letter type</param>
 /// <param name="facilityId">Id of the facility</param>
 /// <returns>
 /// Returns the physician details corresponding to given letter type id and facility id
 /// </returns>
 public List <getPhysiciansList_Results> GetPhysicianList(string letterTypeId, string facilityId)
 {
     try
     {
         using (HimLettersEntities entity = new HimLettersEntities())
         {
             return(entity.getPhysiciansList(Convert.ToInt32(letterTypeId), Convert.ToInt32(facilityId)).Select(pe => new getPhysiciansList_Results
             {
                 Email = pe.Email,
                 Name = pe.Name,
                 Fax = pe.Fax
             }).ToList());
         }
     }
     catch (Exception ex1)
     {
         PhysicianException ex = new PhysicianException();
         ex.Title = "Error in ServicePhysician";
         throw new FaultException(ex.Title);
     }
 }