Beispiel #1
0
 public int Delete(CompanyML Company)
 {
     try
     {
         return(CompanyDAL.Delete(Company));
     }
     catch (Exception ex)
     {
         throw new Exception(String.Format("{0}.Delete: {1}", core, ex));
     }
 }
        public IHttpActionResult Delete(int id)
        {
            AjaxStringResult result = new AjaxStringResult();
            Company          model  = _CompanyDAL.Get().FirstOrDefault(o => o.Id == id);

            if (model != null)
            {
                _CompanyDAL.Delete(model);
            }

            result.data = "删除成功";
            return(Json(result));
        }
Beispiel #3
0
 public Boolean Delete(int id)
 {
     try
     {
         if (id == 0)
         {
             throw new Exception("Invalid Parameter!");
         }
         if (!compdal.IsExistID(id))
         {
             throw new Exception("Record does not exist!");
         }
         return(compdal.Delete(id));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #4
0
 public bool DeleteCompany(Company item)
 {
     return(companyDAL.Delete(item));
 }
Beispiel #5
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public bool Delete(int CompanyId, int EditId)
 {
     return(dal.Delete(CompanyId, EditId));
 }
Beispiel #6
0
 public void DeleteCompany(int Id)
 {
     companyDAL.Delete(Id);
 }