public void AddPlanIntegral(ref OperationResult pobjOperationResult, planintegralDto pobjDtoEntity, List <string> ClientSession) { //mon.IsActive = true; string NewId = "(No generado)"; try { SigesoftEntitiesModel dbContext = new SigesoftEntitiesModel(); planintegral objEntity = planintegralAssembler.ToEntity(pobjDtoEntity); objEntity.d_InsertDate = DateTime.Now; objEntity.i_InsertUserId = Int32.Parse(ClientSession[2]); objEntity.i_IsDeleted = 0; // Autogeneramos el Pk de la tabla int intNodeId = int.Parse(ClientSession[0]); NewId = Common.Utils.GetNewId(intNodeId, Utils.GetNextSecuentialId(intNodeId, 327), "PL");; objEntity.v_PlanIntegral = NewId; dbContext.AddToplanintegral(objEntity); dbContext.SaveChanges(); pobjOperationResult.Success = 1; return; } catch (Exception ex) { pobjOperationResult.Success = 0; pobjOperationResult.ExceptionMessage = Common.Utils.ExceptionFormatter(ex); return; } }