Example #1
0
        public static ValidationResultInfo InsertPeopleGroupsQual(PeopleGroupsQualifiche pgq)
        {
            ValidationResultInfo retValue = new ValidationResultInfo();

            DocsPaDB.Query_DocsPAWS.Utenti dbUtenti = new DocsPaDB.Query_DocsPAWS.Utenti();

            //Verifica presenza codice univoco

            retValue.Value = dbUtenti.CheckUniquePeopleGroups(pgq.ID_AMM.ToString(), pgq.ID_UO.ToString(), pgq.ID_GRUPPO.ToString(), pgq.ID_PEOPLE.ToString(), pgq.ID_QUALIFICA.ToString());

            if (!retValue.Value)
            {
                BrokenRule brokenRule = new BrokenRule();
                brokenRule.ID          = "ASSOCIAZIONE_QUALIFICA";
                brokenRule.Description = "Qualifica giĆ  associata all'utente";
                retValue.BrokenRules.Add(brokenRule);
            }
            else
            {
                dbUtenti.InsertPeopleGroupsQual(pgq.ID_AMM.ToString(), pgq.ID_UO.ToString(), pgq.ID_GRUPPO.ToString(), pgq.ID_PEOPLE.ToString(), pgq.ID_QUALIFICA.ToString());
            }
            return(retValue);
        }