csharp Eliminar Linea Grid
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp Eliminar Linea Grid相关的知识,希望对你有一定的参考价值。
public static string Eliminar_Linea(SAPbouiCOM.Form pForma, int Fila, string Tabla , int ColumnaCode)
{
string Resultado = "";
try{
SAPbouiCOM.Grid Grid1;
SAPbouiCOM.DataTable DTGrid;
Grid1 = (SAPbouiCOM.Grid)pForma.Items.Item("Grid1").Specific;
DTGrid = Grid1.DataTable;
SAPbobsCOM.GeneralService oGeneralService;
SAPbobsCOM.GeneralDataParams oGeneralParams;
SAPbobsCOM.CompanyService sCmp;
sCmp = TConstantes.SBOLDObjeto.Company.GetCompanyService();
//Get GeneralService (oCmpSrv is the CompanyService)
oGeneralService = sCmp.GetGeneralService(Tabla);
oGeneralParams = (SAPbobsCOM.GeneralDataParams)oGeneralService.GetDataInterface(SAPbobsCOM.GeneralServiceDataInterfaces.gsGeneralDataParams);
oGeneralParams.SetProperty("Code", DTGrid.GetValue(ColumnaCode, Fila));
oGeneralService.Delete(oGeneralParams);
System.Runtime.InteropServices.Marshal.ReleaseComObject(oGeneralParams);
oGeneralParams = null;
GC.Collect();
System.Runtime.InteropServices.Marshal.ReleaseComObject(oGeneralService);
oGeneralService = null;
GC.Collect();
}catch (Exception ex) {
Resultado = TConstantes.SBOLDObjeto.RetornoError + " " + ex.Message;
}
return Resultado;
}
以上是关于csharp Eliminar Linea Grid的主要内容,如果未能解决你的问题,请参考以下文章
php Eliminar cadenasrecursosestáticos
php Eliminar rango de precios
php Eliminar cabeceras innecesarias
markdown ELIMINAR COLUMNAS
markdown ELIMINAR RELACION DE TABLAS
markdown Eliminar base de datos