Exemplo n.º 1
0
 internal void Delete(T_Item_Delivery_MappingEntity dbEntity)
 {
     using (var conn = new SqlConnection(ConnectionString.XgxInsert))
     {
         conn.Open();
         conn.Delete(dbEntity);
     }
 }
Exemplo n.º 2
0
 internal void Update(T_Item_Delivery_MappingEntity dbEntity)
 {
     using (var conn = new SqlConnection(ConnectionString.XgxInsert))
     {
         dbEntity.Modify_Time = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
         conn.Open();
         conn.Update(dbEntity);
     }
 }
Exemplo n.º 3
0
        private List <T_Item_Delivery_MappingEntity> ConvertToT_Item_Delivery_MappingEntityList(ItemContract contract)
        {
            var result = new List <T_Item_Delivery_MappingEntity>();

            if (contract.DeliveryList == null || contract.DeliveryList.Count == 0)
            {
                var itemDeliveryMappingEntityUnkown = new T_Item_Delivery_MappingEntity
                {
                    Item_Delivery_Id = Guid.NewGuid().ToString("N"),
                    CustomerId       = ConfigMgr.CustomerId,
                    Item_Id          = contract.ItemId,
                    DeliveryId       = 2,
                    Create_Time      = contract.CreateTime == null ? null : contract.CreateTime.Value.ToString("yyyy-MM-dd hh:mm:ss"),
                    Modify_Time      = contract.ModifyTime == null ? null : contract.ModifyTime.Value.ToString("yyyy-MM-dd hh:mm:ss"),
                };
                result.Add(itemDeliveryMappingEntityUnkown);
                return(result);
            }

            foreach (var i in contract.DeliveryList)
            {
                if (i == EnumDelivery.Unknown)
                {
                    var itemDeliveryMappingEntityUnkown = new T_Item_Delivery_MappingEntity
                    {
                        Item_Delivery_Id = Guid.NewGuid().ToString("N"),
                        CustomerId       = ConfigMgr.CustomerId,
                        Item_Id          = contract.ItemId,
                        DeliveryId       = (int)EnumDelivery.ShopPickUp,
                        Create_Time      = contract.CreateTime == null ? null : contract.CreateTime.Value.ToString("yyyy-MM-dd hh:mm:ss"),
                        Modify_Time      = contract.ModifyTime == null ? null : contract.ModifyTime.Value.ToString("yyyy-MM-dd hh:mm:ss"),
                    };
                    result.Add(itemDeliveryMappingEntityUnkown);
                    break;
                }
                var itemDeliveryMappingEntity = new T_Item_Delivery_MappingEntity
                {
                    Item_Delivery_Id = Guid.NewGuid().ToString("N"),
                    CustomerId       = ConfigMgr.CustomerId,
                    Item_Id          = contract.ItemId,
                    DeliveryId       = (int)i,
                    Create_Time      = contract.CreateTime == null ? null : contract.CreateTime.Value.ToString("yyyy-MM-dd hh:mm:ss"),
                    Modify_Time      = contract.ModifyTime == null ? null : contract.ModifyTime.Value.ToString("yyyy-MM-dd hh:mm:ss"),
                };
                result.Add(itemDeliveryMappingEntity);
            }
            return(result);
        }
Exemplo n.º 4
0
 public void Create(T_Item_Delivery_MappingEntity dbEntity)
 {
     _cmd.Create(dbEntity);
 }
Exemplo n.º 5
0
 public void Update(T_Item_Delivery_MappingEntity dbEntity)
 {
     _cmd.Update(dbEntity);
 }
Exemplo n.º 6
0
 public void Delete(T_Item_Delivery_MappingEntity dbEntity)
 {
     _cmd.Delete(dbEntity);
 }
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="pEntity">实体实例</param>
 /// <param name="pTran">事务实例,可为null,如果为null,则不使用事务来更新</param>
 public void Update(T_Item_Delivery_MappingEntity pEntity, IDbTransaction pTran)
 {
     _currentDAO.Update(pEntity, pTran);
 }
 /// <summary>
 /// 创建一个新实例
 /// </summary>
 /// <param name="pEntity">实体实例</param>
 public void Create(T_Item_Delivery_MappingEntity pEntity)
 {
     _currentDAO.Create(pEntity);
 }
 /// <summary>
 /// 分页根据实体条件查询实体
 /// </summary>
 /// <param name="pQueryEntity">以实体形式传入的参数</param>
 /// <param name="pOrderBys">排序组合</param>
 /// <returns>符合条件的实体集</returns>
 public PagedQueryResult <T_Item_Delivery_MappingEntity> PagedQueryByEntity(T_Item_Delivery_MappingEntity pQueryEntity, OrderBy[] pOrderBys, int pPageSize, int pCurrentPageIndex)
 {
     return(_currentDAO.PagedQueryByEntity(pQueryEntity, pOrderBys, pPageSize, pCurrentPageIndex));
 }
 /// <summary>
 /// 根据实体条件查询实体
 /// </summary>
 /// <param name="pQueryEntity">以实体形式传入的参数</param>
 /// <param name="pOrderBys">排序组合</param>
 /// <returns>符合条件的实体集</returns>
 public T_Item_Delivery_MappingEntity[] QueryByEntity(T_Item_Delivery_MappingEntity pQueryEntity, OrderBy[] pOrderBys)
 {
     return(_currentDAO.QueryByEntity(pQueryEntity, pOrderBys));
 }
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="pEntity"></param>
 public void Delete(T_Item_Delivery_MappingEntity pEntity)
 {
     _currentDAO.Delete(pEntity);
 }