Exemple #1
0
        public HttpResponseMessage Addterminal(PM_BPM_TERMINAL definitions)
        {
            definitions.CreatedOn = SSGlobalConfig.Now;
            PM_BPM_TERMINAL_QueryParam terminalQueray = new PM_BPM_TERMINAL_QueryParam();

            terminalQueray.TerminalID = definitions.TerminalID;

            IList <PM_BPM_TERMINAL> list = terminalBO.GetEntities(terminalQueray);

            if (list.Count != 0)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, "该工位已经存在"));
            }
            else
            {
                definitions.TerminalGuid = Guid.NewGuid();
                PM_BPM_TERMINAL mmExt = terminalBO.Insert(definitions);
                if (mmExt != null)
                {
                    return(Request.CreateResponse(HttpStatusCode.OK, "新增成功"));
                }
                else
                {
                    return(Request.CreateResponse(HttpStatusCode.InternalServerError, "新增失败"));
                }
            }
        }
Exemple #2
0
 public void Updateterminal(PM_BPM_TERMINAL definitions)
 {
     definitions.CreatedOn = SSGlobalConfig.Now;
     try
     {
         terminalBO.Update(definitions);
     }
     catch (Exception e)
     {
         throw e;
     }
 }