Example #1
0
        ///<summary></summary>
        public static void DeleteForLab(long ehrLabNum)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                Meth.GetVoid(MethodBase.GetCurrentMethod(), ehrLabNum);
                return;
            }
            EhrLabSpecimenConditions.DeleteForLab(ehrLabNum);
            EhrLabSpecimenRejectReasons.DeleteForLab(ehrLabNum);
            string command = "DELETE FROM ehrlabspecimen WHERE EhrLabNum = " + POut.Long(ehrLabNum);

            Db.NonQ(command);
        }
 ///<summary></summary>
 public static EhrLabSpecimen InsertItem(EhrLabSpecimen ehrLabSpecimen)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         return(Meth.GetObject <EhrLabSpecimen>(MethodBase.GetCurrentMethod(), ehrLabSpecimen));
     }
     ehrLabSpecimen.EhrLabNum = Crud.EhrLabSpecimenCrud.Insert(ehrLabSpecimen);
     for (int i = 0; i < ehrLabSpecimen.ListEhrLabSpecimenCondition.Count; i++)
     {
         ehrLabSpecimen.ListEhrLabSpecimenCondition[i].EhrLabSpecimenNum = ehrLabSpecimen.EhrLabSpecimenNum;
         EhrLabSpecimenConditions.Insert(ehrLabSpecimen.ListEhrLabSpecimenCondition[i]);
     }
     for (int i = 0; i < ehrLabSpecimen.ListEhrLabSpecimenRejectReason.Count; i++)
     {
         ehrLabSpecimen.ListEhrLabSpecimenRejectReason[i].EhrLabSpecimenNum = ehrLabSpecimen.EhrLabSpecimenNum;
         EhrLabSpecimenRejectReasons.Insert(ehrLabSpecimen.ListEhrLabSpecimenRejectReason[i]);
     }
     return(ehrLabSpecimen);
 }