public void DeleteTest() { int addressId = 1; ConsigneeProvider provider = new ConsigneeProvider(); bool res = provider.Delete(addressId); Assert.IsTrue(res); }
/// <summary> /// 删除收货地址 /// </summary> /// <param name="AddressId"></param> /// <param name="OwnerId"></param> /// <param name="OwnerType"></param> /// <returns></returns> public ActionResult Delete(int AddressId, int OwnerId, int OwnerType) { if (OwnerType == (int)Address_Owner_Type.个人用户) { OwnerId = Package.UserId; } ConsigneeProvider provider = new ConsigneeProvider(); if (!provider.Delete(AddressId)) { return(FailResult(provider.PromptInfo.CustomMessage, (int)provider.PromptInfo.ResultType)); } return(SuccessResult()); }