コード例 #1
0
        public IList <UnitProductLogistic> Select(UnitProductLogistic data)
        {
            IList <UnitProductLogistic> datos = new List <UnitProductLogistic>();

            datos = GetHsql(data).List <UnitProductLogistic>();
            if (!Factory.IsTransactional)
            {
                Factory.Commit();
            }
            return(datos);
        }
コード例 #2
0
        public override IQuery GetHsql(Object data)
        {
            StringBuilder       sql = new StringBuilder("select a from UnitProductLogistic a    where  ");
            UnitProductLogistic unitproductlogistic = (UnitProductLogistic)data;

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

                if (unitproductlogistic.LogisticUnit != null && unitproductlogistic.LogisticUnit.RowID != 0)
                {
                    sql.Append(" a.LogisticUnit.RowID = id1     and    ");
                    Parms.Add(new Object[] { "id1", unitproductlogistic.LogisticUnit.RowID });
                }

                if (unitproductlogistic.ContainedUnit != null && unitproductlogistic.ContainedUnit.RowID != 0)
                {
                    sql.Append(" a.ContainedUnit.RowID = id2     and    ");
                    Parms.Add(new Object[] { "id2", unitproductlogistic.ContainedUnit.RowID });
                }

                if (unitproductlogistic.AmountOfContained != 0)
                {
                    sql.Append(" a.Amount = id3     and    ");
                    Parms.Add(new Object[] { "id3", unitproductlogistic.AmountOfContained });
                }
            }

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

            SetParameters(query);
            return(query);
        }
コード例 #3
0
 public void DeleteUnitProductLogistic(UnitProductLogistic data)
 {
     try {
     SetService();  SerClient.DeleteUnitProductLogistic(data); }
     finally
     {
         SerClient.Close();
         if (SerClient.State == CommunicationState.Faulted)
         SerClient.Abort(); 
     }
 }
コード例 #4
0
 public UnitProductLogistic SaveUnitProductLogistic(UnitProductLogistic data)
 {
     try {
     SetService();  return SerClient.SaveUnitProductLogistic(data); }
     finally
     {
         SerClient.Close();
         if (SerClient.State == CommunicationState.Faulted)
         SerClient.Abort(); 
     }
 }
コード例 #5
0
 public UnitProductLogistic SelectById(UnitProductLogistic data)
 {
     return((UnitProductLogistic)base.SelectById(data));
 }
コード例 #6
0
 public Boolean Delete(UnitProductLogistic data)
 {
     return(base.Delete(data));
 }
コード例 #7
0
 public Boolean Update(UnitProductLogistic data)
 {
     return(base.Update(data));
 }
コード例 #8
0
 public UnitProductLogistic Save(UnitProductLogistic data)
 {
     return((UnitProductLogistic)base.Save(data));
 }