Ejemplo n.º 1
0
        public virtual IGxCollection GetAll(int Start, int Count)
        {
            IGxSilentTrn trn = getTransaction();
            Type         me  = trn.GetType();

            return(me.InvokeMember("GetAll", BindingFlags.InvokeMethod, null, trn, new object[] { Start, Count }) as IGxCollection);
        }
Ejemplo n.º 2
0
        private IndexRecord GetIndexRecord(object obj, GxContentInfo contentInfo)
        {
            IndexRecord    ir     = null;
            GxFile         file   = obj as GxFile;
            GxSilentTrnSdt silent = obj as GxSilentTrnSdt;
            string         str    = obj as string;

            if (file != null && contentInfo != null)
            {
                ir         = new IndexRecord();
                ir.Uri     = file.GetAbsoluteName();
                ir.Content = DocumentHandler.GetText(file.GetAbsoluteName(), Path.GetExtension(file.GetAbsoluteName()));
                ir.Entity  = contentInfo.Entity == null?file.GetType().ToString() : contentInfo.Entity;

                ir.Title = contentInfo.Title == null?file.GetName() : contentInfo.Title;

                ir.Viewer = contentInfo.Viewer == null?file.GetName() : contentInfo.Viewer;

                ir.Keys = contentInfo.Keys == null || contentInfo.Keys.Count == 0 ? new List <string>() : contentInfo.Keys;
            }
            else if (silent != null)
            {
                IGxSilentTrn  bc   = (silent).getTransaction();
                GxContentInfo info = bc.GetContentInfo();
                if (info != null)
                {
                    ir         = new IndexRecord();
                    ir.Uri     = info.Id;
                    ir.Content = bc.ToString();
                    ir.Entity  = contentInfo.Entity == null ? info.Entity : contentInfo.Entity;
                    ir.Title   = contentInfo.Title == null ? info.Title : contentInfo.Title;
                    ir.Viewer  = contentInfo.Viewer == null ? info.Viewer : contentInfo.Viewer;
                    ir.Keys    = contentInfo.Keys == null || contentInfo.Keys.Count == 0 ? info.Keys : contentInfo.Keys;
                }
            }
            else if (str != null && contentInfo != null)
            {
                ir         = new IndexRecord();
                ir.Uri     = contentInfo.Id == null ? string.Empty : contentInfo.Id;
                ir.Content = str;
                ir.Entity  = contentInfo.Entity == null ? String.Empty : contentInfo.Entity;
                ir.Title   = contentInfo.Title == null ? String.Empty : contentInfo.Title;
                ir.Viewer  = contentInfo.Viewer == null ? String.Empty : contentInfo.Viewer;
                ir.Keys    = contentInfo.Keys == null || contentInfo.Keys.Count == 0 ? new List <string>() : contentInfo.Keys;
            }
            return(ir);
        }
Ejemplo n.º 3
0
 protected void UpdateImpl( )
 {
     if (StringUtil.StrCmp(Gx_mode, "UPD") == 0)
     {
         SaveImpl( );
     }
     else
     {
         SdtSYS_UserRole auxBC = new SdtSYS_UserRole(context);
         auxBC.Load(A359UserID, A361RoleID);
         auxBC.UpdateDirties(bcSYS_UserRole);
         auxBC.Save();
         IGxSilentTrn auxTrn = auxBC.getTransaction();
         LclMsgLst          = (msglist)(auxTrn.GetMessages());
         AnyError           = (short)(auxTrn.Errors());
         Gx_mode            = auxTrn.GetMode();
         context.GX_msglist = LclMsgLst;
         AfterTrn( );
     }
 }
Ejemplo n.º 4
0
 protected void UpdateImpl( )
 {
     if (StringUtil.StrCmp(Gx_mode, "UPD") == 0)
     {
         SaveImpl( );
     }
     else
     {
         GeneXus.Programs.wwpbaseobjects.SdtSecFunctionalityRole auxBC = new GeneXus.Programs.wwpbaseobjects.SdtSecFunctionalityRole(context);
         auxBC.Load(A1SecFunctionalityId, A4SecRoleId);
         auxBC.UpdateDirties(bcwwpbaseobjects_SecFunctionalityRole);
         auxBC.Save();
         IGxSilentTrn auxTrn = auxBC.getTransaction();
         LclMsgLst          = (msglist)(auxTrn.GetMessages());
         AnyError           = (short)(auxTrn.Errors());
         Gx_mode            = auxTrn.GetMode();
         context.GX_msglist = LclMsgLst;
         AfterTrn( );
     }
 }
Ejemplo n.º 5
0
 protected void UpdateImpl( )
 {
     if (StringUtil.StrCmp(Gx_mode, "UPD") == 0)
     {
         SaveImpl( );
     }
     else
     {
         SdtBR_PatientReEntity auxBC = new SdtBR_PatientReEntity(context);
         auxBC.Load(A85BR_Information_ID, A366DataPackage);
         auxBC.UpdateDirties(bcBR_PatientReEntity);
         auxBC.Save();
         IGxSilentTrn auxTrn = auxBC.getTransaction();
         LclMsgLst          = (msglist)(auxTrn.GetMessages());
         AnyError           = (short)(auxTrn.Errors());
         Gx_mode            = auxTrn.GetMode();
         context.GX_msglist = LclMsgLst;
         AfterTrn( );
     }
 }
Ejemplo n.º 6
0
 protected void UpdateImpl( )
 {
     if (StringUtil.StrCmp(Gx_mode, "UPD") == 0)
     {
         SaveImpl( );
     }
     else
     {
         GeneXus.Programs.wwpbaseobjects.SdtUserCustomizations auxBC = new GeneXus.Programs.wwpbaseobjects.SdtUserCustomizations(context);
         auxBC.Load(A16UserCustomizationsId, A17UserCustomizationsKey);
         auxBC.UpdateDirties(bcwwpbaseobjects_UserCustomizations);
         auxBC.Save();
         IGxSilentTrn auxTrn = auxBC.getTransaction();
         LclMsgLst          = (msglist)(auxTrn.GetMessages());
         AnyError           = (short)(auxTrn.Errors());
         Gx_mode            = auxTrn.GetMode();
         context.GX_msglist = LclMsgLst;
         AfterTrn( );
     }
 }
Ejemplo n.º 7
0
        public GXBaseCollection <SdtMessages_Message> GetMessages()
        {
            short item = 1;
            GXBaseCollection <SdtMessages_Message> msgs = new GXBaseCollection <SdtMessages_Message>(context, "Messages.Message", "Genexus");
            SdtMessages_Message m1;
            IGxSilentTrn        trn = getTransaction();

            if (trn != null)
            {
                msglist msgList = trn.GetMessages();
                while (item <= msgList.ItemCount)
                {
                    m1                   = new SdtMessages_Message(context);
                    m1.gxTpr_Id          = msgList.getItemValue(item);
                    m1.gxTpr_Description = msgList.getItemText(item);
                    m1.gxTpr_Type        = msgList.getItemType(item);
                    msgs.Add(m1, 0);
                    item = (short)(item + 1);
                }
            }
            return(msgs);
        }
Ejemplo n.º 8
0
 public void ErrorCheck(IGxSilentTrn trn)
 {
     if (trn.Errors() == 1)
     {
         msglist msg = trn.GetMessages();
         if (msg.Count > 0)
         {
             msglistItem msgItem = (msglistItem)msg[0];
             if (msgItem.gxTpr_Id.Contains("NotFound"))
             {
                 SetError("404", msgItem.gxTpr_Description);
             }
             else if (msgItem.gxTpr_Id.Contains("WasChanged"))
             {
                 SetError("409", msgItem.gxTpr_Description);
             }
             else
             {
                 SetError("400", msgItem.gxTpr_Description);
             }
         }
     }
 }
Ejemplo n.º 9
0
 public void setTransaction(IGxSilentTrn t)
 {
     dirties.Clear();
     trn = t;
 }