Exemple #1
0
        public BJElectronicExemplarAvailabilityCodes GetElectronicExemplarAccessLevel(int IDMAIN, int IDProject)
        {
            DataTable table = dbWrapper.GetElectronicExemplarAccessLevel(IDMAIN, IDProject);

            if (table.Rows.Count == 0)
            {
                throw new Exception("В таблице BookProject нет такой записи!");
            }
            switch (table.Rows[0]["CodeTypeProject"].ToString())
            {
            case "v-stop":
                return(BJElectronicExemplarAvailabilityCodes.vstop);

            case "v-free-view":
                return(BJElectronicExemplarAvailabilityCodes.vfreeview);

            case "v-login-view":
                return(BJElectronicExemplarAvailabilityCodes.vloginview);

            case "dlstop":
                return(BJElectronicExemplarAvailabilityCodes.dlstop);

            case "dlopen":
                return(BJElectronicExemplarAvailabilityCodes.dlopen);

            case "dlview":
                return(BJElectronicExemplarAvailabilityCodes.dlview);

            case "dllimit":
                return(BJElectronicExemplarAvailabilityCodes.dllimit);
            }
            return(BJElectronicExemplarAvailabilityCodes.vstop);
        }