示例#1
0
 public Response <Application> Post(Application application)
 {
     try
     {
         Application app = ApplicationDAL.Create(application);
         return(new Response <Application>(app));
     }
     catch (Exception ex)
     {
         return(new Response <Application>(ex.Message));
     }
 }
示例#2
0
 public IApplication Create(string id, string customerId, string region, DateTime?dateApplied, DateTime?dateTraved, string offNoteNo, DateTime?offNoteDate, string remark)
 {
     using (var cmd = new DBCommand())
     {
         try
         {
             IApplication instance = ApplicationDAL.Create(cmd, id, customerId, region, dateApplied, dateTraved,
                                                           offNoteNo, offNoteDate,
                                                           remark);
             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);
             }
         }
     }
 }