Exemplo n.º 1
0
        public IList <WFDataType> Select(WFDataType data)
        {
            IList <WFDataType> datos = new List <WFDataType>();

            try {
                datos = GetHsql(data).List <WFDataType>();
                if (!Factory.IsTransactional)
                {
                    Factory.Commit();
                }
            }
            catch (Exception e)
            {
                NHibernateHelper.WriteEventLog(WriteLog.GetTechMessage(e));
            }
            return(datos);
        }
Exemplo n.º 2
0
        public override IQuery GetHsql(Object data)
        {
            StringBuilder sql      = new StringBuilder("select a from WFDataType a    where  ");
            WFDataType    DataType = (WFDataType)data;

            if (DataType != null)
            {
                Parms = new List <Object[]>();
                if (DataType.DataTypeID != 0)
                {
                    sql.Append(" a.DataTypeID = :id     and   ");
                    Parms.Add(new Object[] { "id", DataType.DataTypeID });
                }

                if (!String.IsNullOrEmpty(DataType.Name))
                {
                    sql.Append(" a.Name = :nom     and   ");
                    Parms.Add(new Object[] { "nom", DataType.Name });
                }

                if (DataType.IsBasic != null)
                {
                    sql.Append(" a.IsBasic = :nomf     and   ");
                    Parms.Add(new Object[] { "nomf", DataType.IsBasic });
                }

                if (!String.IsNullOrEmpty(DataType.UIListControl))
                {
                    sql.Append(" a.UIListControl = :nom1    and   ");
                    Parms.Add(new Object[] { "nom1", DataType.UIListControl });
                }
            }

            sql = new StringBuilder(sql.ToString());
            sql.Append(" 1=1 order by a.DataTypeID asc ");
            IQuery query = Factory.Session.CreateQuery(sql.ToString());

            SetParameters(query);
            return(query);
        }
Exemplo n.º 3
0
 internal void DeleteWFDataType(WFDataType WFDataType)
 {
     try
     {
         SetService();
         SerClient.DeleteWFDataType(WFDataType);
     }
     finally
     {
         SerClient.Close();
         if (SerClient.State == CommunicationState.Faulted)
             SerClient.Abort();
     }
 }
Exemplo n.º 4
0
 internal WFDataType SaveWFDataType(WFDataType WFDataType)
 {
     try
     {
         SetService();
         return SerClient.SaveWFDataType(WFDataType);
     }
     finally
     {
         SerClient.Close();
         if (SerClient.State == CommunicationState.Faulted)
             SerClient.Abort();
     }
 }
Exemplo n.º 5
0
 public WFDataType SelectById(WFDataType data)
 {
     return((WFDataType)base.SelectById(data));
 }
Exemplo n.º 6
0
 public Boolean Delete(WFDataType data)
 {
     return(base.Delete(data));
 }
Exemplo n.º 7
0
 public Boolean Update(WFDataType data)
 {
     return(base.Update(data));
 }
Exemplo n.º 8
0
 public WFDataType Save(WFDataType data)
 {
     return((WFDataType)base.Save(data));
 }