Пример #1
0
        public Signal AddSignal(Signal s, string ajaxSessionKey)
        {
            CheckRequest(ajaxSessionKey);

            SignalManager sm = new SignalManager();
            s.CreationDate = DateTime.Now;
            s.UpdateDate = DateTime.Now;
            s.Status = Signal.SignalStatus.Approved; // FIX!!!!
            s.UpdateDate = DateTime.Now;
            s.ResolutionDescription = string.Empty;
            sm.CreateSignal(s);

            return s;
        }
Пример #2
0
        public void CreateSignal(Signal s)
        {
            try
            {
                OpenSession();
                OpenTransaction();
                session.Save(s);
                CommitTransaction();
                CloseSession();
            }
            catch (Exception ex)
            {
                RollbackTransaction();
                throw ex;
            }
            finally
            {

            }
        }
Пример #3
0
        private string GetSignalDescription(Signal s)
        {
            CategoryManager cm = new CategoryManager();
            string categoryName = cm.Load(s.CategoryID).Name;
            StringBuilder sb = new StringBuilder();
            sb.Append(s.Subject);
            sb.Append("<br/>");
            sb.Append("<br/>");
            sb.Append("Inviato ");
            sb.Append(SignalUtils.GetTimeframe(s.CreationDate));
            sb.Append(" ");
            sb.Append("nella categoria '");
            sb.Append(categoryName);
            sb.Append("'");
            sb.Append(" - ");
            sb.Append(s.Address);

            return sb.ToString();
        }