예제 #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));
     }
 }
예제 #2
0
        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));
        }
예제 #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;
     }
 }
예제 #4
0
 public bool DeleteCompany(Company item)
 {
     return(companyDAL.Delete(item));
 }
예제 #5
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public bool Delete(int CompanyId, int EditId)
 {
     return(dal.Delete(CompanyId, EditId));
 }
예제 #6
0
 public void DeleteCompany(int Id)
 {
     companyDAL.Delete(Id);
 }