Пример #1
0
 public void addWarning(int?theWarningId, DBUserCommunication theDbUserCom, User theUser, int theNumber = 0)
 {
     if (!list.ContainsKey(theWarningId))
     {
         theDbUserCom.insertWarning(theWarningId, theNumber, theUser);
     }
     else
     {
         theDbUserCom.updateWarning(theWarningId, theNumber, theUser);
     }
     setWarning(theWarningId, theNumber);
 }
        public MelenchBotDBInterractions(MelenchBot theMelenchBot)
        {
            melenchBot = theMelenchBot;

            dbWarningCommunication = new DBWarningCommunication();
            lsWarnings             = dbWarningCommunication.getWarnings();
            dbStatusCommunication  = new DBStatusCommunication();
            lsStatus            = dbStatusCommunication.getStatuss();
            dbUserCommunication = new DBUserCommunication();
            lsUsers             = dbUserCommunication.getUsers(lsStatus);

            foreach (KeyValuePair <string, User> u in lsUsers.list)
            {
                dbUserCommunication.setUserWarnings(u.Value);
            }
        }