Class StdBSAnexos
Serviços de manipulação de anexos (ficheiros).
Inheritance
Inherited Members
Namespace: StdPlatBS100
Assembly: StdPlatBS100.dll
Syntax
[ComVisible(true)]
[Guid("D827C805-7568-4F65-8D8E-D853B578D9CA")]
[ClassInterface(ClassInterfaceType.None)]
public class StdBSAnexos : IStdBSAnexos, IDisposable
Methods
Actualiza(StdBEAnexo)
Actualizas the specified object anexo.
Declaration
public void Actualiza(StdBEAnexo objAnexo)
Parameters
| Type | Name | Description |
|---|---|---|
| StdBEAnexo | objAnexo | The object anexo. |
AdicionaAnexo(StdBETipos.EnumTabelaAnexos, String, String)
Adiciona um anexo.
Declaration
public void AdicionaAnexo(StdBETipos.EnumTabelaAnexos enuTabela, string strFicheiro, string strChave)
Parameters
| Type | Name | Description |
|---|---|---|
| StdBETipos.EnumTabelaAnexos | enuTabela | Tabela Anexos. |
| System.String | strFicheiro | Nome do ficheiro. |
| System.String | strChave | Chave. |
AdicionaAnexoSemDescricao(StdBETipos.EnumTabelaAnexos, String, String)
Adiciona um anexo.
Declaration
public void AdicionaAnexoSemDescricao(StdBETipos.EnumTabelaAnexos enuTabela, string strFicheiro, string strChave)
Parameters
| Type | Name | Description |
|---|---|---|
| StdBETipos.EnumTabelaAnexos | enuTabela | Tabela Anexos. |
| System.String | strFicheiro | Nome do ficheiro. |
| System.String | strChave | Chave. |
CarregaLista(GridControl, StdBETipos.EnumTabelaAnexos, String, ImageList)
Carrega a lista de anexos associados a uma determinada entidade (definida pela tabela e pela chave).
Declaration
public void CarregaLista(GridControl objLista, StdBETipos.EnumTabelaAnexos enuTabela, string strChave, ImageList imgList)
Parameters
| Type | Name | Description |
|---|---|---|
| DevExpress.XtraGrid.GridControl | objLista | Lista onde serão carregados os anexos (ListView). |
| StdBETipos.EnumTabelaAnexos | enuTabela | Tipo de tabela. |
| System.String | strChave | Chave da entidade. |
| System.Windows.Forms.ImageList | imgList |
DaAnexoBase64(StdBEAnexo, Boolean)
Retrives an attachment in base64 format.
Declaration
public byte[] DaAnexoBase64(StdBEAnexo objAnexo, bool readOnly)
Parameters
| Type | Name | Description |
|---|---|---|
| StdBEAnexo | objAnexo | |
| System.Boolean | readOnly |
Returns
| Type | Description |
|---|---|
| System.Byte[] |
DaPercursoAnexo(String, StdBEAnexo, String)
Devolve o percurso físico de um anexo.
Declaration
public string DaPercursoAnexo(string strIdAnexo, StdBEAnexo objAnexo = null, string strNomeFicheiro = "")
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | strIdAnexo | Identificador do anexo. |
| StdBEAnexo | objAnexo | Definição do anexo. |
| System.String | strNomeFicheiro | Nome do ficheiro. |
Returns
| Type | Description |
|---|---|
| System.String |
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |
FormataBarraFerramentas(Object, BarManager, Object)
Formata a barra de ferramentas associada à lista de anexo.
Declaration
public void FormataBarraFerramentas(dynamic objForm, BarManager objBarManager, dynamic objContainer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | objForm | |
| DevExpress.XtraBars.BarManager | objBarManager | |
| System.Object | objContainer |
FormataLista(GridView)
Declaration
public void FormataLista(GridView objLista)
Parameters
| Type | Name | Description |
|---|---|---|
| DevExpress.XtraGrid.Views.Grid.GridView | objLista |
FormataLista(ListView)
Formatação inicial da ListView que apresenta a lista de anexos.
Declaration
public void FormataLista(ListView objLista)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.ListView | objLista | Lista onde serão apresentados os anexos (ListView). |
FormataListaParametros(GridView, StdBEParamsAnexos)
Formatação da lista para apresentação de anexos.
Declaration
public void FormataListaParametros(GridView objLista, StdBEParamsAnexos objParams)
Parameters
| Type | Name | Description |
|---|---|---|
| DevExpress.XtraGrid.Views.Grid.GridView | objLista | The object lista. |
| StdBEParamsAnexos | objParams | The object parameters. |
FormataListaParametros(ListView, StdBEParamsAnexos)
Formatação da lista para apresentação de anexos.
Declaration
public void FormataListaParametros(ListView objLista, StdBEParamsAnexos objParams)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.ListView | objLista | Lista onde serão apresentados os anexos (ListView). |
| StdBEParamsAnexos | objParams | Parâmetros de configuração dos anexos. |
ListaAnexosTabela(StdBETipos.EnumTabelaAnexos, String)
Declaration
public StdBEAnexos ListaAnexosTabela(StdBETipos.EnumTabelaAnexos enuTabela, string strChave)
Parameters
| Type | Name | Description |
|---|---|---|
| StdBETipos.EnumTabelaAnexos | enuTabela | |
| System.String | strChave |
Returns
| Type | Description |
|---|---|
| StdBEAnexos |
MarcaTodosOsAnexosParaSincronizacao()
Marca todos os anexos para sincronização, por exemplo, na eventualidade de uma mudança de fornecedor de serviço
Declaration
public void MarcaTodosOsAnexosParaSincronizacao()
MenuItemSeleccionado(String, GridControl, StdBETipos.EnumTabelaAnexos, String, Boolean, ImageList)
Execução das operação associadas à barra de ferramentas de anexos.
Declaration
public bool MenuItemSeleccionado(string strComando, GridControl objLista, StdBETipos.EnumTabelaAnexos enuTabela, string strChave, bool blnNovoRegisto, ImageList imgList)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | strComando | Comando seleccionado pelo utilizador. |
| DevExpress.XtraGrid.GridControl | objLista | Lista (ListView) que apresenta os anexos. |
| StdBETipos.EnumTabelaAnexos | enuTabela | Tipo de tabela. |
| System.String | strChave | Chave da entidade. |
| System.Boolean | blnNovoRegisto | Indica se os anexos estão associados a uma nova entidade (ainda não existente na base de dados). |
| System.Windows.Forms.ImageList | imgList |
Returns
| Type | Description |
|---|---|
| System.Boolean |
MenuItemSeleccionado(String, ListView, StdBETipos.EnumTabelaAnexos, String, Boolean)
Execução das operação associadas à barra de ferramentas de anexos.
Declaration
public bool MenuItemSeleccionado(string strComando, ListView objLista, StdBETipos.EnumTabelaAnexos enuTabela, string strChave, bool blnNovoRegisto)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | strComando | Comando seleccionado pelo utilizador. |
| System.Windows.Forms.ListView | objLista | Lista (ListView) que apresenta os anexos. |
| StdBETipos.EnumTabelaAnexos | enuTabela | Tipo de tabela. |
| System.String | strChave | Chave da entidade. |
| System.Boolean | blnNovoRegisto | Indica se os anexos estão associados a uma nova entidade (ainda não existente na base de dados). |
Returns
| Type | Description |
|---|---|
| System.Boolean |
MostraAnexo(String)
Mostra o anexo.
Declaration
public void MostraAnexo(string strPercAnexo)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | strPercAnexo | Percurso do anexo. |
MostraPopup(Object)
Provoca a apresentação do menu de contexto da lista de anexos.
Declaration
public void MostraPopup(dynamic objForm)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | objForm | Barra de ferramentas (ActiveBar2) onde está definido o menu de contexto. |
MudaEstadoAnexo(String, StdBETipos.AttachmentSyncState)
Muda o estado de um anexo.
Declaration
public void MudaEstadoAnexo(string attachmentId, StdBETipos.AttachmentSyncState state)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | attachmentId | |
| StdBETipos.AttachmentSyncState | state |
ObtemAnexo(StdBEAnexo, Boolean, Boolean)
Retrives a file from cloud storage if needed and return its path.
Declaration
public Task<string> ObtemAnexo(StdBEAnexo objAnexo, bool readOnly, bool showUI = true)
Parameters
| Type | Name | Description |
|---|---|---|
| StdBEAnexo | objAnexo | |
| System.Boolean | readOnly | |
| System.Boolean | showUI |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> |
Remove(String)
Remove um anexo.
Declaration
public void Remove(string strIdAnexo)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | strIdAnexo | Identificador do anexo. |
RemoveAnexosTabela(StdBETipos.EnumTabelaAnexos, String)
Remove todos os anexos associados a uma entidade (na base de dados).
Declaration
public void RemoveAnexosTabela(StdBETipos.EnumTabelaAnexos enuTabela, string strChave)
Parameters
| Type | Name | Description |
|---|---|---|
| StdBETipos.EnumTabelaAnexos | enuTabela | Tipo de tabela. |
| System.String | strChave | Chave da entidade. |