/// <summary> /// 删除客户 /// </summary> /// <param name="customerIds">客户id集合</param> /// <returns></returns> public bool Delete(List <string> customerIds) { if (customerIds == null || customerIds.Count == 0) { return(false); } return(_customerProvider.Delete(customerIds)); }
public ActionResult Delete(string cusNum) { CustomerProvider provider = new CustomerProvider(); int line = provider.Delete(cusNum); if (line > 0) { this.ReturnJson.AddProperty("d", "success"); } else { this.ReturnJson.AddProperty("d", ""); } return(Content(this.ReturnJson.ToString())); }
/// <summary> /// 删除客户信息 /// </summary> /// <returns></returns> public ActionResult Delete() { List <string> list = WebUtil.GetFormObject <List <string> >("List"); string CompanyID = WebUtil.GetFormValue <string>("CompanyID"); CustomerProvider provider = new CustomerProvider(CompanyID); int line = provider.Delete(list); DataResult result = new DataResult(); if (line > 0) { result.Code = (int)EResponseCode.Success; result.Message = string.Format("客户删除成功,受影响行数{0}行", line); } else { result.Code = (int)EResponseCode.Exception; result.Message = "客户删除失败"; } return(Content(JsonHelper.SerializeObject(result))); }