public void DeleteGoodsTest() { // string ConnectionString = string.Empty; // TODO: 初始化为适当的值 DBLendingInfo target = new DBLendingInfo(connstr); // TODO: 初始化为适当的值 int LendingType = 0; // TODO: 初始化为适当的值 string LendingExInfo = string.Empty; // TODO: 初始化为适当的值 string WorkShopGUID = string.Empty; // TODO: 初始化为适当的值 LendingExInfo = "532"; WorkShopGUID = "3b50bf66-dabb-48c0-8b6d-05db80591090"; target.DeleteGoods(LendingType, LendingExInfo, WorkShopGUID); Assert.IsNotNull(target); // Assert.Inconclusive("无法验证不返回值的方法。"); }
public Get_OutDeleteGoods DeleteGoods(string data) { Get_OutDeleteGoods result = new Get_OutDeleteGoods(); try { Get_InDeleteGoods input = Newtonsoft.Json.JsonConvert.DeserializeObject <Get_InDeleteGoods>(data); db.DeleteGoods(input.LendingType, input.LendingExInfo, input.WorkShopGUID); result.result = "0"; result.resultStr = "ok"; } catch (Exception ex) { result.result = "1"; result.resultStr = ex.Message.ToString(); } return(result); }