public object PostAddEdit(DBConnectionDTO DBConnectionDTO) { sysBpmsDBConnection dBConnection = new sysBpmsDBConnection(); ResultOperation resultOperation = dBConnection.Update(DBConnectionDTO.ID, DBConnectionDTO.Name, DBConnectionDTO.DataSource, DBConnectionDTO.InitialCatalog, DBConnectionDTO.UserID, DBConnectionDTO.Password, DBConnectionDTO.IntegratedSecurity); if (!resultOperation.IsSuccess) { return(new PostMethodMessage(resultOperation.GetErrors(), DisplayMessageType.error)); } using (DBConnectionService dBConnectionService = new DBConnectionService()) { if (dBConnection.ID != Guid.Empty) { resultOperation = dBConnectionService.Update(dBConnection); } else { resultOperation = dBConnectionService.Add(dBConnection); } if (resultOperation.IsSuccess) { return(new PostMethodMessage(SharedLang.Get("Success.Text"), DisplayMessageType.success)); } else { return(new PostMethodMessage(resultOperation.GetErrors(), DisplayMessageType.error)); } } }