コード例 #1
0
        public IHttpActionResult DeleteCustomer(Guid id)
        {
            var customer = db.DeleteCustomer(id);

            if (customer == null)
            {
                return(NotFound());
            }
            else
            {
                return(Ok(customer));
            }
        }
コード例 #2
0
        public AjaxResult Delete([FromBody] List <Guid> _customerids)
        {
            var _ajaxResult = new AjaxResult();

            try
            {
                _customerDL.DeleteCustomer(_customerids);
            }catch (Exception ex)
            {
                _ajaxResult.Success = false;
                _ajaxResult.Data    = ex;
                _ajaxResult.Message = Resources.errorTV;
            }
            return(_ajaxResult);
        }
コード例 #3
0
        public AjaxResult Delete([FromBody] List <Guid> _cus)
        {
            var _ajaxResult = new AjaxResult();

            try
            {
                _cusDL.DeleteCustomer(_cus);
            }
            catch (Exception ex)
            {
                _ajaxResult.Success = false;
                _ajaxResult.Message = "Lỗi xóa";
                _ajaxResult.Data    = ex;
            }
            return(_ajaxResult);
        }
コード例 #4
0
 public static void DeleteCustomer(long id)
 {
     CustomerDL.DeleteCustomer(id);
 }