Ejemplo n.º 1
0
 internal static void removeTable(UserTablesMD ut, string name, SAPbouiCOM.Application app,
                                 SAPbobsCOM.Company company)
 {
     int ret;
     string errMsg;
     if (ut.GetByKey(name))
     {
         ret = ut.Remove();
         if (ret != 0)
         {
             company.GetLastError(out ret, out errMsg);
             app.SetStatusBarMessage("Error removing table " + name, SAPbouiCOM.BoMessageTime.bmt_Short, true);
             throw new Exception(errMsg);
         }
         app.StatusBar.SetSystemMessage("Removed table " + name,
             SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success);
     }
 }
Ejemplo n.º 2
0
 internal static void removeUDO(UserObjectsMD uo, string name,
                     SAPbouiCOM.Application app, SAPbobsCOM.Company company)
 {
     int ret;
     string errMsg;
     if (uo.GetByKey(name))
     {
         ret = uo.Remove();
         if (ret != 0)
         {
             company.GetLastError(out ret, out errMsg);
             app.SetStatusBarMessage(string.Format("Error removing object {0}", name),
                 SAPbouiCOM.BoMessageTime.bmt_Short, true);
             throw new Exception(errMsg);
         }
         app.StatusBar.SetSystemMessage(string.Format("Removed field {0}", name),
             SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success);
     }
 }
Ejemplo n.º 3
0
 internal static void removeField(UserFieldsMD uf, string tableName, int fieldID, 
                     SAPbouiCOM.Application app, SAPbobsCOM.Company company)
 {
     int ret;
     string errMsg;
     if (uf.GetByKey(tableName, fieldID))
     {
         ret = uf.Remove();
         if (ret != 0)
         {
             company.GetLastError(out ret, out errMsg);
             app.SetStatusBarMessage(string.Format("Error removing field {0}-{1}",
                 tableName, fieldID), SAPbouiCOM.BoMessageTime.bmt_Short, true);
             throw new Exception(errMsg);
         }
         app.StatusBar.SetSystemMessage(string.Format("Removed field {0}-{1}",
             tableName, fieldID),
             SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success);
     }
 }