Ejemplo n.º 1
0
        /// <summary>
        /// Crea un nuevo SARSURPICRequest en base de datos
        /// </summary>
        /// <param name="request"></param>
        public void Create(SARSURPICRequest request, int inOut)
        {
            request.MsgInOut             = new MsgInOut();
            request.MsgInOut.DDPVersion  = request.DDPVersionNum;
            request.MsgInOut.Destination = "";
            request.MsgInOut.InOut       = inOut;
            request.MsgInOut.MsgId       = request.MessageId;
            request.MsgInOut.MsgType     = request.MessageType;
            request.MsgInOut.RefId       = "";
            request.MsgInOut.Source      = request.DataUserRequestor;
            request.MsgInOut.TimeStamp   = request.TimeStamp;

            context.SARSURPICRequests.InsertOnSubmit(request);
            context.SubmitChanges();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Transforma un SARSURPICType en un SARSURPICRequest
        /// </summary>
        /// <param name="SARSURPICRequest">SARSURPICType</param>
        /// <returns>SARSURPICRequest</returns>
        public static SARSURPICRequest Map2DB(DataCenterLogic.DataCenterTypesIDE.SARSURPICType SARSURPICRequest)
        {
            SARSURPICRequest retSARSURPICRequest = new SARSURPICRequest();

            retSARSURPICRequest.DataUserRequestor = SARSURPICRequest.DataUserRequestor;
            retSARSURPICRequest.DDPVersionNum     = SARSURPICRequest.DDPVersionNum;
            retSARSURPICRequest.Item              = SARSURPICRequest.Item;
            retSARSURPICRequest.ItemElementName   = SARSURPICRequest.ItemElementName.ToString();
            retSARSURPICRequest.MessageId         = SARSURPICRequest.MessageId;
            retSARSURPICRequest.MessageType       = ToInt(SARSURPICRequest.MessageType);
            retSARSURPICRequest.NumberOfPositions = int.Parse(SARSURPICRequest.NumberOfPositions);
            retSARSURPICRequest.schemaVersion     = SARSURPICRequest.schemaVersion;
            retSARSURPICRequest.test              = ToInt(SARSURPICRequest.test);
            retSARSURPICRequest.TimeStamp         = SARSURPICRequest.TimeStamp;

            return(retSARSURPICRequest);
        }