Exemple #1
0
        ///<summary>Gets a single sheet from the database.  Then, gets all the fields and parameters for it.  So it returns a fully functional sheet.</summary>
        public static Sheet GetSheet(long sheetNum)
        {
            //No need to check RemotingRole; no call to db.
            Sheet sheet = CreateObject(sheetNum);

            SheetFields.GetFieldsAndParameters(sheet);
            return(sheet);
        }
Exemple #2
0
        ///<summary>Gets a single sheet from the database.  Then, gets all the fields and parameters for it.  So it returns a fully functional sheet.
        ///Returns null if the sheet isn't found in the database.</summary>
        public static Sheet GetSheet(long sheetNum)
        {
            //No need to check RemotingRole; no call to db.
            Sheet sheet = GetOne(sheetNum);

            if (sheet == null)
            {
                return(null);               //Sheet was deleted.
            }
            SheetFields.GetFieldsAndParameters(sheet);
            return(sheet);
        }
Exemple #3
0
        ///<summary>Gets sheets with PatNum=0 and IsDeleted=0. Sheets with no PatNums were most likely transferred from CEMT tool.
        ///Also sets the sheet's SheetFields.</summary>
        public static List <Sheet> GetTransferSheets()
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                return(Meth.GetObject <List <Sheet> >(MethodBase.GetCurrentMethod()));
            }
            //Sheets with patnum=0 and the sheet has a sheetfield.
            string command = "SELECT * FROM sheet "
                             + "INNER JOIN sheetfield ON sheetfield.SheetNum=sheet.SheetNum "
                             + "WHERE PatNum=0 AND IsDeleted=0 "
                             + "AND sheetfield.FieldName='isTransfer' "
                             + $"AND SheetType={POut.Int((int)SheetTypeEnum.PatientForm)}";
            List <Sheet> retVal = Crud.SheetCrud.SelectMany(command);

            //Get the Sheetfields and parameters for each of the CEMT sheets
            foreach (Sheet sheet in retVal)
            {
                SheetFields.GetFieldsAndParameters(sheet);
            }
            return(retVal);
        }