Esempio n. 1
0
        internal List <BJElectronicExemplarAvailabilityStatus> LoadAvailabilityStatuses(int IDMAIN, string Fund)
        {
            DataTable table      = dbWrapper.LoadAvailabilityStatuses(IDMAIN, Fund);
            var       listResult = new List <BJElectronicExemplarAvailabilityStatus>();
            BJElectronicExemplarAvailabilityStatus result;

            foreach (DataRow row in table.Rows)
            {
                result = new BJElectronicExemplarAvailabilityStatus();
                switch (row["CodeTypeProject"].ToString())
                {
                case "v-stop":
                    result.Code = BJElectronicExemplarAvailabilityCodes.vstop;
                    break;

                case "v-free-view":
                    result.Code = BJElectronicExemplarAvailabilityCodes.vfreeview;
                    break;

                case "v-login-view":
                    result.Code = BJElectronicExemplarAvailabilityCodes.vloginview;
                    break;

                case "dlstop":
                    result.Code = BJElectronicExemplarAvailabilityCodes.dlstop;
                    break;

                case "dlopen":
                    result.Code = BJElectronicExemplarAvailabilityCodes.dlopen;
                    break;

                case "dlview":
                    result.Code = BJElectronicExemplarAvailabilityCodes.dlview;
                    break;

                case "dllimit":
                    result.Code = BJElectronicExemplarAvailabilityCodes.dllimit;
                    break;
                }
                switch ((int)row["IDProject"])
                {
                case 1:
                    result.Project = BJElectronicAvailabilityProjects.VGBIL;
                    break;

                case 2:
                    result.Project = BJElectronicAvailabilityProjects.NEB;
                    break;
                }
                listResult.Add(result);
            }
            return(listResult);
        }