Example #1
0
        //take input id from PL and send to DAL form deletion of particular row
        public bool Delete(int apid)
        {
            bool dlt = false;

            //ApplicationDAL app = new ApplicationDAL();
            DalObject.Delete(apid);
            dlt = true;
            if (dlt == false)
            {
                throw new UniversityException("Program Deletion failed");
            }
            return(dlt);
        }
Example #2
0
 public IApplication Delete(IApplication instance)
 {
     using (var cmd = new DBCommand())
     {
         try
         {
             ApplicationDAL.Delete(cmd, instance);
             cmd.Commit();
             return(instance);
         }
         catch (Exception ex)
         {
             cmd.RollBack();
             using (var builder = new MessageBuilder())
             {
                 string err = builder.AppendLine("删除申请单错误!").AppendLine(ex).Message;
                 throw new Exception(err);
             }
         }
     }
 }