コード例 #1
0
      public MessageModel SaveOutdoorPatient(DAL.Model.OutdoorPatient aOutdoorPatient)
      {
          MessageModel aMessageModel = new MessageModel();

          aOutdoorPatientGatway = new OutdoorPatientGatway();


          DataTable data = new DataTable();

          data = aOutdoorPatientGatway.IsExist(aOutdoorPatient);
          if (data.Rows.Count > 0)
          {
              aMessageModel.MessageTitle = "Warning";
              aMessageModel.MessageBody  = "This patient already exist. Press the refresh button. \n Thank You.";
              return(aMessageModel);
          }
          string message = Ischecked(aOutdoorPatient);

          if (message != "Checked")
          {
              aMessageModel.MessageTitle = "Warning";
              aMessageModel.MessageBody  = message;
              return(aMessageModel);
          }

          if (aOutdoorPatientGatway.SaveOutdoorPatient(aOutdoorPatient) > 0)
          {
              //int  saveCount = new IpdGateway().SavePatientServiceIPD(aOutdoorPatient.AService);
              aMessageModel.MessageTitle = "Successful";
              aMessageModel.MessageBody  = "Outdoor patient information saved successfully.";
          }
          return(aMessageModel);
      }
コード例 #2
0
      public MessageModel UpdateOutdoorPatient(DAL.Model.OutdoorPatient aOutdoorPatient)
      {
          MessageModel aMessageModel = new MessageModel();

          aOutdoorPatientGatway = new OutdoorPatientGatway();

          //DataTable data = new DataTable();
          //data = aOutdoorPatientGatway.IsExist(aOutdoorPatient);
          //if (data.Rows.Count > 0)
          //{
          //    aMessageModel.MessageTitle = "Warning";
          //    aMessageModel.MessageBody = "This patient already exist. Press the refresh button. \n Thank You.";
          //    return aMessageModel;
          //}

          string message = Ischecked(aOutdoorPatient);

          if (message != "Checked")
          {
              aMessageModel.MessageTitle = "Warning";
              aMessageModel.MessageBody  = message;
              return(aMessageModel);
          }
          if (aOutdoorPatientGatway.UpdateOutdoorPatient(aOutdoorPatient) > 0)
          {
              aMessageModel.MessageTitle = "Successful";
              aMessageModel.MessageBody  = "Outdoor patient information updated successfully.";
          }
          return(aMessageModel);
      }
コード例 #3
0
      //public DataTable GetDoctorById(DAL.Model.OutdoorPatient aOutdoorPatient)
      //{
      //    aOutdoorPatientGatway = new OutdoorPatientGatway();
      //    DataTable dataTable = aOutdoorPatientGatway.GetDoctorById(aOutdoorPatient);
      //    return dataTable;
      //}
      public DataTable GeneratePatientId()
      {
          aOutdoorPatientGatway = new OutdoorPatientGatway();
          DataTable data = aOutdoorPatientGatway.GeneratePatientId();

          return(data);
      }
コード例 #4
0
      public DataTable PopulateGridView(DateTime fromDate, DateTime ToDate)
      {
          aOutdoorPatientGatway = new OutdoorPatientGatway();
          DataTable dataTable = aOutdoorPatientGatway.PopulateGridView(fromDate, ToDate);

          return(dataTable);
      }
コード例 #5
0
      public DataTable GetAllDoctorsById(string DoctorId)
      {
          aOutdoorPatientGatway = new OutdoorPatientGatway();
          DataTable dataTable = aOutdoorPatientGatway.GetAllDoctorsById(DoctorId);

          return(dataTable);
      }
コード例 #6
0
      public DataTable GetAllDoctors()
      {
          aOutdoorPatientGatway = new OutdoorPatientGatway();
          DataTable dataTable = aOutdoorPatientGatway.GetAllDoctors();

          return(dataTable);
      }
コード例 #7
0
        public MessageModel UpdateAdmissionPatient(Patient patient, DAL.Model.OutdoorPatient aOutdoorPatient)
        {
            aIpdGateway = new IpdGateway();
            MessageModel aMessageModel = new MessageModel();
            int          saveCount     = 0;


            OutdoorPatientGatway aOutdoorPatientGatway = new OutdoorPatientGatway();
            DataTable            data = new DataTable();

            data = aOutdoorPatientGatway.IsExist(aOutdoorPatient);
            if (data.Rows.Count > 0)
            {
                saveCount = aIpdGateway.UpdateAdmissionPatient(patient);
                aMessageModel.MessageTitle = "Successfull";
                aMessageModel.MessageBody  = "Indoor patient information updated successfully!";
                return(aMessageModel);
            }
            else
            {
                saveCount = aIpdGateway.UpdateAdmissionPatient(patient);
                saveCount = new OutdoorPatientGatway().UpdateOutdoorPatient(aOutdoorPatient);
                aMessageModel.MessageTitle = "Successfull";
                aMessageModel.MessageBody  = "Indoor patient information updated successfully!";
            }
            return(aMessageModel);
        }
コード例 #8
0
      public MessageModel DeleteOutdoorPatient(DAL.Model.OutdoorPatient aOutdoorPatient)
      {
          aOutdoorPatientGatway = new OutdoorPatientGatway();
          MessageModel aMessageModel = new MessageModel();

          if (aOutdoorPatientGatway.DeleteOutdoorPatient(aOutdoorPatient) > 0)
          {
              aMessageModel.MessageTitle = "Successfull";
              aMessageModel.MessageBody  = "Birth info deleted successfully.";
          }
          return(aMessageModel);
      }
コード例 #9
0
        public MessageModel SaveIpdPatient(Patient patient, Service service, DAL.Model.OutdoorPatient aOutdoorPatient)
        {
            int          saveCount     = 0;
            MessageModel aMessageModel = new MessageModel();
            string       message       = Ischecked(patient);

            if (message != "Checked")
            {
                aMessageModel.MessageTitle = "Warning";
                aMessageModel.MessageBody  = message;
                return(aMessageModel);
            }


            OutdoorPatientGatway aOutdoorPatientGatway = new OutdoorPatientGatway();
            DataTable            data = new DataTable();

            data = aOutdoorPatientGatway.IsExist(aOutdoorPatient);
            if (data.Rows.Count > 0)
            {
                saveCount = new IpdGateway().SaveAdmissionPatient(patient);
                saveCount = new IpdGateway().SavePatientServiceIPD(service);
                if (saveCount > 0)
                {
                    aMessageModel.MessageTitle = "Successful";
                    aMessageModel.MessageBody  = "Indoor patient information saved successfully!";
                }
                return(aMessageModel);
            }
            else
            {
                saveCount = new IpdGateway().SaveAdmissionPatient(patient);
                saveCount = new IpdGateway().SavePatientServiceIPD(service);
                saveCount = new OutdoorPatientGatway().SaveOutdoorPatient(aOutdoorPatient);
                if (saveCount > 0)
                {
                    aMessageModel.MessageTitle = "Successful";
                    aMessageModel.MessageBody  = "Indoor patient information saved successfully!";
                }
                return(aMessageModel);
            }
        }