Beispiel #1
0
        /// <summary>
        /// setTheChosen noted records at booked
        /// </summary>
        /// <param name="listToChange">list of ordId-s</param>
        public void setTheseRecordAsBookedBunch(List <string> listToChange)
        {
            List <KeyValuePair <string, string> > listOfParam;

            try
            {
                listOfParam = new List <KeyValuePair <string, string> >();
                foreach (string row in listToChange)
                {
                    KeyValuePair <string, string> param = new KeyValuePair <string, string>("@ordId", row);
                    listOfParam.Add(param);
                }
            }
            catch (Exception e)
            {
                throw new ErrorOrderingSetNotedAsBooked("A kéréshez a paraméterlista összeállítása sikertelen (ModOrdBook) " + e.Message);
            }
            try
            {
                if (listOfParam.Count > 0)
                {
                    mdi.openConnection();
                    foreach (KeyValuePair <string, string> param in listOfParam)
                    {
                        mdi.execPrepDMQueryWithKVP(queryToSetNotedAsBooked, param);
                    }

                    mdi.closeConnection();
                }
            }
            catch (Exception e)
            {
                throw new ErrorOrderingSetNotedAsBooked("A kéréssorozat végrehajtása sikertelen (ModOrdBook) " + e.Message);
            }
        }
Beispiel #2
0
        /// <summary>
        /// execute real deletion in 'jogosultsag' but the string have additional secure condition
        /// </summary>
        /// <param name="groupName">userRightGroup thet is needed to delete</param>
        public void setDeleteOfRightGroup(string groupName)
        {
            KeyValuePair <string, string> param;

            try
            {
                param = new KeyValuePair <string, string>("@groupname", groupName);
            }
            catch (Exception e)
            {
                throw new ErrorServiceRightsGroupFreeToDelet("A lekérdezéshez kérés összeállítása sikertelen (ModRightDel) "
                                                             + e.Message);
            }
            mdi.openConnection();
            mdi.execPrepDMQueryWithKVP(queryOfDeletUserRightGroup, param);
            mdi.closeConnection();
        }