public IList<MessageRuleByCompany> Select(MessageRuleByCompany data)
 {
         IList<MessageRuleByCompany> datos = new List<MessageRuleByCompany>();
         datos = GetHsql(data).List<MessageRuleByCompany>();
         if (!Factory.IsTransactional)
             Factory.Commit();
         return datos;            
 }
Beispiel #2
0
        }                                                //Dias (86400), Hour (3600), Minutes (60), Seconds (1)


        public override Boolean Equals(object obj)
        {
            if ((obj == null) || (obj.GetType() != this.GetType()))
            {
                return(false);
            }
            MessageRuleByCompany castObj = (MessageRuleByCompany)obj;

            return((castObj != null) && (this.RowID == castObj.RowID));
        }
Beispiel #3
0
 public void UpdateMessageRuleByCompany(MessageRuleByCompany data) { Factory.DaoMessageRuleByCompany().Update(data); }
Beispiel #4
0
 public void DeleteMessageRuleByCompany(MessageRuleByCompany data) { Factory.DaoMessageRuleByCompany().Delete(data); }
Beispiel #5
0
 public MessageRuleByCompany SaveMessageRuleByCompany(MessageRuleByCompany data) { return Factory.DaoMessageRuleByCompany().Save(data); }
Beispiel #6
0
 public IList<MessageRuleByCompany> GetMessageRuleByCompany(MessageRuleByCompany data) { return Factory.DaoMessageRuleByCompany().Select(data); }
Beispiel #7
0
        public IList<Int32> SelectRulesMessage(Document document, MessageRuleByCompany rule)
        {
            string sQuery = "";

                sQuery = "select DocID from Trace.Document a left outer join Report.MessagePool m on a.DocID = m.RecordID "+
                   " and m.EntityID = :idx1 and m.RuleID  = :rule Where  " +
                   "  ( a.CreationDate >= :dtm1 or a.ModDate  >= :dtm1 ) and m.RecordID is null ";


            StringBuilder sql = new StringBuilder(sQuery);

            if (document != null)
            {
                Parms = new List<Object[]>();
                Parms.Add(new Object[] { "dtm1", DateTime.Today.AddDays(-5) }); //Limita a enviar solo los del dia
                Parms.Add(new Object[] { "idx1", EntityID.Document }); 
                Parms.Add(new Object[] { "rule", rule.RowID }); //Rule a ejecutar


                if (document.DocType != null && document.DocType.DocTypeID != 0)
                {
                    sql.Append(" and a.DocTypeID = :id1   ");
                    Parms.Add(new Object[] { "id1", document.DocType.DocTypeID });

                }

                if (document.DocStatus != null && document.DocStatus.StatusID != 0)
                {
                    sql.Append(" and a.DocStatusID = :id3   ");
                    Parms.Add(new Object[] { "id3", document.DocStatus.StatusID });

                }

                //sql.Append(" and ( a.DocStatusID != :id2) ");
                //Parms.Add(new Object[] { "id2", DocStatus.Cancelled });

            }

            sql = new StringBuilder(sql.ToString());

            IQuery query = Factory.Session.CreateSQLQuery(sql.ToString());
            SetParameters(query);
            return query.List<Int32>();

        }
 public MessageRuleByCompany SelectById(MessageRuleByCompany data)
 {
     return (MessageRuleByCompany)base.SelectById(data);
 }
 public Boolean Delete(MessageRuleByCompany data)
 {
     return base.Delete(data);
 }
 public Boolean Update(MessageRuleByCompany data)
 {
     return base.Update(data);
 }
 public MessageRuleByCompany Save(MessageRuleByCompany data)
 {
     return (MessageRuleByCompany)base.Save(data);
 }