Exemplo n.º 1
0
 public static void Create(Patient pat, CommOptOutType optOutType, CommOptOutMode optOutMode)
 {
     CommOptOuts.InsertMany(new List <CommOptOut> {
         new CommOptOut {
             PatNum = pat.PatNum, CommType = optOutType, CommMode = optOutMode
         }
     });
 }
Exemplo n.º 2
0
        public static List <CommOptOut> GetForPats(List <long> listPatNums, CommOptOutType optOutType)
        {
            if (listPatNums.Count == 0)
            {
                return(new List <CommOptOut>());
            }
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                return(Meth.GetObject <List <CommOptOut> >(MethodBase.GetCurrentMethod(), listPatNums, optOutType));
            }
            string command = "SELECT * FROM commoptout WHERE PatNum IN(" + string.Join(",", listPatNums.Select(x => POut.Long(x))) + ") "
                             + "AND CommType=" + POut.Int((int)optOutType);

            return(Crud.CommOptOutCrud.SelectMany(command));
        }