Exemplo n.º 1
0
 protected override List <TargetType> Execute(CodeActivityContext context)
 {
     object[] args = { this.Name.Get(context), typeof(TargetType).Name };
     try{
         return(SAPGui.FindAllByNameCustom <SourceType, TargetType>(this.Source.Get(context), this.Name.Get(context)));
     }catch (Exception e) {
         return(default(List <TargetType>));
     }
 }
Exemplo n.º 2
0
 protected override void Execute(CodeActivityContext context)
 {
     try
     {
         SAPGui.KeepOneSessionSAP();
     }
     catch (Exception e)
     {
         throw new Exception(string.Format("Not able to close SAP session: {0}.", e.Message));
     }
 }
Exemplo n.º 3
0
 protected override void Execute(CodeActivityContext context)
 {
     try
     {
         this.Output.Set(context, SAPGui.NewSession(this.CurrentSession.Get(context)));
     }
     catch (Exception e)
     {
         throw new Exception(string.Format("Not able to create new SAP session: {0}.", e.Message));
     }
 }
Exemplo n.º 4
0
 protected override void Execute(CodeActivityContext context)
 {
     try
     {
         this.GuiSessionOutput.Set(context, SAPGui.GetObjSessionById(this.Id.Get(context)));
     }
     catch (Exception e)
     {
         throw new Exception(string.Format("Not able to find session: {0}.", e.Message));
     }
 }
Exemplo n.º 5
0
        protected override void Execute(CodeActivityContext context)
        {
            sapfewse.GuiSession session = this.GuiSession.Get(context);
            if (session == null)
            {
                try
                {
                    session = SAPGui.GetObjSessionById(this.SessionId.Get(context));
                }
                catch (Exception e)
                {
                    throw new Exception(string.Format("Not able to find session: {0}.", e.Message));
                }
            }

            session.UnlockSessionUI();
        }
Exemplo n.º 6
0
        protected override T Execute(CodeActivityContext context)
        {
            T          temp           = default(T);
            GuiSession currentSession = this.Session.Get(context);

            if (currentSession == null)
            {
                currentSession = SAPGui.GetCurrentSession();
            }

            object output = (currentSession as GuiSession).FindById(this.Id.Get(context), false);

            if (output == null)
            {
                return(temp);
            }
            else
            {
                return((T)(currentSession as GuiSession).FindById(this.Id.Get(context), false));
            }
        }
Exemplo n.º 7
0
 protected override void Execute(CodeActivityContext context)
 {
     this.Connection.Set(context, SAPGui.CreateConnection(this.Description.Get(context), this.User.Get(context), this.Password.Get(context), this.Language.Get(context)));
 }