Esempio n. 1
0
        public Result InsertLogisticsData(tblLogistics logisticsList)
        {
            IProduction iProductionSelect = new WCMS_DAL_Production();
            var         result            = new Result();

            using (
                var transaction = new TransactionScope(TransactionScopeOption.Required,
                                                       ApplicationState.TransactionOptions))
                try
                {
                    result.IsSuccess = iProductionSelect.tblLogistics(logisticsList);

                    if (result.IsSuccess)
                    {
                        transaction.Complete();
                    }
                    else
                    {
                        transaction.Dispose();
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            return(result);
        }
Esempio n. 2
0
 public List <tblLogistics> GetLogisticsList(tblLogistics logistics)
 {
     try
     {
         ISelectingCommon iDataAccessSelect = new DALGetCommonSelecting();
         return(iDataAccessSelect.GetLogisticsList(logistics));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 3
0
 public Result InsertLogisticsData(tblLogistics logisticsList)
 {
     try
     {
         return(productionManager.InsertLogisticsData(logisticsList));
     }
     catch (Exception ex)
     {
         return(new Result {
             IsSuccess = false, Message = ex.Message
         });
     }
 }
Esempio n. 4
0
 public bool tblLogistics(tblLogistics logisticsList)
 {
     try
     {
         _entity.tblLogistics.Add(logisticsList);
         _entity.SaveChanges();
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(true);
 }
Esempio n. 5
0
        public List <tblLogistics> GetLogisticsList(tblLogistics logistics)
        {
            var list = new List <tblLogistics>();

            try
            {
                list = _CommonManager.GetLogisticsList(logistics);
            }
            catch (Exception ex)
            {
            }

            return(list);
        }
        public List <tblLogistics> GetLogisticsList(tblLogistics logistics)
        {
            List <tblLogistics> list;

            try
            {
                list = _wcmsEntities.tblLogistics

                       .WhereIf(logistics.BoxCode != null, x => x.BoxCode == logistics.BoxCode)
                       .WhereIf(logistics.Imei1 != null, x => x.Imei1 == logistics.Imei1)
                       .WhereIf(logistics.Imei2 != null, x => x.Imei2 == logistics.Imei2)

                       .AsNoTracking().ToList();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(list);
        }