Exemplo n.º 1
0
 /// <summary>
 /// 修改一个货品大类
 /// </summary>
 /// <param name="updWarehInvcls">要修改的货品大类</param>
 /// <returns>修改后的货品大类</returns>
 public WarehouseInvcls UpdateWarehInvcls(WarehouseInvcls updWarehInvcls)
 {
     try
     {
         _warehInvclsDal.Update(updWarehInvcls);
         return(updWarehInvcls);
     }
     catch (RepositoryException ex)
     {
         throw ex;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 添加一个货品大类
 /// </summary>
 /// <param name="newWarehInvcls">要添加的货品大类</param>
 /// <returns>添加后的货品大类</returns>
 public WarehouseInvcls AddWarehInvcls(WarehouseInvcls newWarehInvcls)
 {
     try
     {
         _warehInvclsDal.Add(newWarehInvcls);
         return(newWarehInvcls);
     }
     catch (RepositoryException ex)
     {
         throw ex;
     }
 }
Exemplo n.º 3
0
 private void DelSubWarehInvcls(WarehouseInvcls delWarehInvcls)
 {
     if (delWarehInvcls.SubWarehouseInvcls != null)
     {
         foreach (WarehouseInvcls invcls in delWarehInvcls.SubWarehouseInvcls)
         {
             DelSubWarehInvcls(invcls);
         }
     }
     delWarehInvcls.invcls_deleted = true;
     _unitOfWork.AddAction(delWarehInvcls, DataActions.Update);
 }
Exemplo n.º 4
0
 /// <summary>
 /// 删除一个货品大类及下属货品大类
 /// </summary>
 /// <param name="delWarehInvcls">要删除的货品大类</param>
 public void DeleteWarehInvcls(WarehouseInvcls delWarehInvcls)
 {
     try
     {
         DelSubWarehInvcls(delWarehInvcls);
         _unitOfWork.Save();
     }
     catch (RepositoryException ex)
     {
         throw ex;
     }
 }
Exemplo n.º 5
0
 public void DelFullyWarehInvcls(WarehouseInvcls delWarehInvcls)
 {
     _warehInvclsDal.Delete(delWarehInvcls);
 }