/// <summary> /// 删除 /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool DeleteCategory(int ID) { var dbContext = new JooWMSEntities(); var productCategory = dbContext.ProductCategory.Find(ID); productCategory.IsDelete = 1; return dbContext.SaveChanges() > 0; }
/// <summary> /// 添加入库详情(数据访问层) /// </summary> /// <param name="inStor"></param> /// <returns></returns> public bool AddDetail(InStorDetail inStor) { var dbContext = new JooWMSEntities(); var sql = dbContext.InStorDetail.Add(inStor); return(dbContext.SaveChanges() > 0); }
/// <summary> /// 删除 /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool DeleteRole(int ID) { var dbContext = new JooWMSEntities(); var deleteRole = dbContext.SysRole.Find(ID); deleteRole.IsDelete = 1; return(dbContext.SaveChanges() > 0); }
/// <summary> /// /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool deleteOutStorage(int ID) { var dbContext = new JooWMSEntities(); var outSto = dbContext.OutStoDetail.Find(ID); dbContext.OutStoDetail.Remove(outSto); return(dbContext.SaveChanges() > 0); }
/// <summary> /// 删除 /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool DeleteSupplier(int ID) { var dbContext = new JooWMSEntities(); var supplier = dbContext.Supplier.Find(ID); supplier.IsDelete = 1; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 删除 /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool DeleteMenus(int ID) { var entities = new JooWMSEntities(); var menus = entities.SysResource.Find(ID); menus.IsDelete = 1; return(entities.SaveChanges() > 0); }
/// <summary> /// 删除 /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool DeleteProduct(int ID) { var dbContext = new JooWMSEntities(); var product = dbContext.Product.Find(ID); product.IsDelete = 1; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 修改 /// </summary> /// <param name="productCategory"></param> /// <returns></returns> public bool EditCategory(ProductCategory productCategory) { var dbContext = new JooWMSEntities(); var productCategory_ = dbContext.ProductCategory.Find(productCategory.ID); productCategory_.CateName = productCategory.CateName; productCategory_.Remark = productCategory.Remark; return dbContext.SaveChanges() > 0; }
/// <summary> /// 删除 /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool DeleteDetail(int ID) { var dbContext = new JooWMSEntities(); var detail = dbContext.InStorDetail.Find(ID); dbContext.InStorDetail.Remove(detail); return(dbContext.SaveChanges() > 0); }
/// <summary> /// 删除 /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool DeleteMeasure(int ID) { var dbContext = new JooWMSEntities(); var delMeasure = dbContext.Measure.Find(ID); dbContext.Measure.Remove(delMeasure); return(dbContext.SaveChanges() > 0); }
/// <summary> /// 删除 /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool DeleteCusAddress(int ID) { var dbContext = new JooWMSEntities(); var cusAddress = dbContext.CusAddress.Find(ID); dbContext.CusAddress.Remove(cusAddress); return(dbContext.SaveChanges() > 0); }
/// <summary> /// 删除 /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool DeleteMove(int ID) { var dbContext = new JooWMSEntities(); var delMove = dbContext.MoveOrder.Find(ID); delMove.IsDelete = 1; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 删除 /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool DeleteLocation(int ID) { var dbContext = new JooWMSEntities(); var location = dbContext.Location.Find(ID); location.IsDelete = 1; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 删除 /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool DeleteOutStorage(int ID) { var dbContext = new JooWMSEntities(); var outStorage = dbContext.OutStorage.Find(ID); outStorage.IsDelete = 1; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 删除 /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool DeleteUser(int ID) { var dbContext = new JooWMSEntities(); var user = dbContext.Admin.Find(ID); user.IsDelete = 1; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 修改 /// </summary> /// <param name="localProduct"></param> /// <returns></returns> public bool EditProduct(LocalProduct localProduct) { var dbContext = new JooWMSEntities(); var localProduct_ = dbContext.LocalProduct.Find(localProduct.ID); localProduct_.Num = localProduct_.Num - localProduct.Num; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 修改库存表中的数量 /// </summary> /// <param name="localProduct"></param> /// <returns></returns> public bool EditNum(LocalProduct localProduct) { var dbContext = new JooWMSEntities(); var localProduct_ = dbContext.LocalProduct.FirstOrDefault(item => item.LocalNum == localProduct.LocalNum && item.BarCode == localProduct.BarCode); localProduct_.Num = localProduct.Num; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 修改 /// </summary> /// <param name="sysDepart"></param> /// <returns></returns> public bool EditDepartment(SysDepart sysDepart) { var entities = new JooWMSEntities(); var depart = entities.SysDepart.Find(sysDepart.ID); depart.DepartName = sysDepart.DepartName; return(entities.SaveChanges() > 0); }
/// <summary> /// 根据ID删除 /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool DeleteDepartment(int ID) { var entities = new JooWMSEntities(); var depar = entities.SysDepart.Find(ID); depar.IsDelete = 1; return(entities.SaveChanges() > 0); }
/// <summary> /// 删除 /// </summary> /// <param name="ID"></param> /// <returns></returns> public bool DeleteCustomer(int ID) { var dbContext = new JooWMSEntities(); var inStorage = dbContext.Customer.Find(ID); inStorage.IsDelete = 1; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 编辑 /// </summary> /// <param name="measure"></param> /// <returns></returns> public bool EditMeasure(Measure measure) { var dbContext = new JooWMSEntities(); var measure_ = dbContext.Measure.Find(measure.ID); measure_.MeasureName = measure.MeasureName; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 修改审核入库单号 /// </summary> /// <param name="storage"></param> /// <returns></returns> public bool EditCheckMove(MoveOrder moveOrder) { var dbContext = new JooWMSEntities(); var moveOrder_ = dbContext.MoveOrder.Find(moveOrder.ID); moveOrder_.Status = moveOrder.Status; moveOrder_.Reason = moveOrder.Reason; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 修改 /// </summary> /// <param name="sysRole"></param> /// <returns></returns> public bool EditRole(SysRole sysRole) { var dbContext = new JooWMSEntities(); var role_ = dbContext.SysRole.Find(sysRole.ID); role_.RoleName = sysRole.RoleName; role_.Remark = sysRole.Remark; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 修改移库信息 /// </summary> /// <param name="moveOrder"></param> /// <returns></returns> public bool EditMove(MoveOrder moveOrder) { var dbContext = new JooWMSEntities(); var moveOrder_ = dbContext.MoveOrder.Find(moveOrder.ID); moveOrder_.MoveType = moveOrder.MoveType; moveOrder_.Remark = moveOrder.Remark; moveOrder_.ContractOrder = moveOrder_.ContractOrder; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 修改审核入库单号 /// </summary> /// <param name="storage"></param> /// <returns></returns> public bool EditCheckInStorage(InStorage storage) { var dbContext = new JooWMSEntities(); var storage_ = dbContext.InStorage.Find(storage.ID); storage_.Status = storage.Status; storage_.AuditeTime = DateTime.Now; storage_.Reason = storage.Reason; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 编辑用户地址 /// </summary> /// <param name="cusAddress"></param> /// <returns></returns> public bool EditCusAddRess(CusAddress cusAddress) { var dbContext = new JooWMSEntities(); var cusAddress_ = dbContext.CusAddress.Find(cusAddress.ID); cusAddress_.Address = cusAddress.Address; cusAddress_.Contact = cusAddress.Contact; cusAddress_.Phone = cusAddress.Phone; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 出库单审核 /// </summary> /// <param name="outStorage"></param> /// <returns></returns> public bool EditCheckOutStorage(OutStorage outStorage) { var dbContext = new JooWMSEntities(); var outStorage_ = dbContext.OutStorage.Find(outStorage.ID); outStorage_.Status = outStorage.Status; outStorage_.AuditeTime = DateTime.Now; outStorage_.Reason = outStorage.Reason; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 编辑 /// </summary> /// <param name="location"></param> /// <returns></returns> public bool EditLocation(Location location) { var dbContext = new JooWMSEntities(); var location_ = dbContext.Location.Find(location.ID); location_.LocalName = location.LocalName; location_.LocalBarCode = location.LocalBarCode; location_.LocalType = location.LocalType; location_.IsDefault = location.IsDefault; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 修改 /// </summary> /// <param name="customer"></param> /// <returns></returns> public bool EditCustomer(Customer customer) { var dbContext = new JooWMSEntities(); var customer_ = dbContext.Customer.Find(customer.ID); customer_.CusName = customer.CusName; customer_.Email = customer.Email; customer_.Fax = customer.Fax; customer_.Phone = customer.Phone; customer_.Remark = customer.Remark; return(dbContext.SaveChanges() > 0); }
/// <summary> /// 修改 /// </summary> /// <param name="sysResource"></param> /// <returns></returns> public bool EditMenus(SysResource sysResource) { var entities = new JooWMSEntities(); var menues = entities.SysResource.Find(sysResource.ID); menues.ResName = sysResource.ResName; menues.ParentNum = sysResource.ParentNum; menues.Sort = sysResource.Sort; menues.Url = sysResource.Url; menues.CssName = sysResource.CssName; menues.ResType = sysResource.ResType; return(entities.SaveChanges() > 0); }