Esempio n. 1
0
 public dr_recall_rcd CreateDrRecallRcd(dr_recall_rcd info, out string error)
 {
     error = string.Empty;
     try
     {
         dr_recall_rcd_DA da = new dr_recall_rcd_DA();
         da.CreateDrRecallRcd(info, out error);
         return info;
     }
     catch (Exception ex)
     {
         error += Share.BaseTool.FormatExceptionMessage(ex);
         return null;
     }
 }
Esempio n. 2
0
 public dr_recall_rcd CreateDrRecallRcd(dr_recall_rcd info, out string error)
 {
     error = string.Empty;
     try
     {
         db.dr_recall_rcd.Add(info);
         db.SaveChanges();
         return info;
     }
     catch (System.Data.Entity.Validation.DbEntityValidationException ex)
     {
         error = Share.BaseTool.FormatExceptionMessage(ex);
         return null;
     }
 }
Esempio n. 3
0
        // POST api/<controller>
        public ResponseMessage Post([FromBody]string value)
        {
            dr_recall_rcd_Bll recallBll = new dr_recall_rcd_Bll();
            string error = string.Empty;

            dr_recall_rcd recallrcd = new dr_recall_rcd();
            recallrcd.Initial();
            recallrcd.drid = DoctorID;
            recallBll.CreateDrRecallRcd(recallrcd, out error);

            Model.ResponseMessage result = new ResponseMessage();
            if (!string.IsNullOrEmpty(error))
            {
                result.bSuccess = true;
            }
            else
            {
                result.bSuccess = false;
                result.Message = error;
            }
            return result;
        }