Example #1
0
 ///<summary>Throws Exception.
 ///Helper method that calls TryInsertPDF(...) for treatment plan PDFs.</summary>
 public static bool TryInsertTreatPlanPDF(PdfDocument doc, TreatPlan treatPlan, bool hasPracticeSig, string unlockCode
                                          , out string errorMsg, out MobileDataByte mobileDataByte)
 {
     mobileDataByte = null;
     if (!MobileAppDevices.IsClinicSignedUpForEClipboard(Clinics.ClinicNum))
     {
         throw new Exception($"This practice or clinic is not signed up for eClipboard.\r\nGo to eServices | Signup Portal to sign up.");
     }
     try{
         List <string> listTagValues = new List <string>()
         {
             treatPlan.Heading, treatPlan.TreatPlanNum.ToString(), hasPracticeSig.ToString(),
             treatPlan.DateTP.Ticks.ToString()
         };
         TryInsertPDF(doc, treatPlan.PatNum, unlockCode, eActionType.TreatmentPlan
                      , out long mobileDataByteNum, out errorMsg, listTagValues
                      );
         if (mobileDataByteNum != -1)
         {
             mobileDataByte = GetOne(mobileDataByteNum);
         }
     }
     catch (Exception ex) {
         errorMsg = ex.Message;
     }
     return(errorMsg.IsNullOrEmpty() && mobileDataByte != null);
 }
Example #2
0
 ///<summary></summary>
 public static void Update(MobileDataByte mobileDataByte)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Meth.GetVoid(MethodBase.GetCurrentMethod(), mobileDataByte);
         return;
     }
     Crud.MobileDataByteCrud.Update(mobileDataByte);
 }
Example #3
0
 ///<summary></summary>
 public static long Insert(MobileDataByte mobileDataByte)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         mobileDataByte.MobileDataByteNum = Meth.GetLong(MethodBase.GetCurrentMethod(), mobileDataByte);
         return(mobileDataByte.MobileDataByteNum);
     }
     return(Crud.MobileDataByteCrud.Insert(mobileDataByte));
 }