示例#1
0
 /// <summary>
 /// Saves the specified table of the configuration database.
 /// </summary>
 public bool SaveTable(IBaseTable baseTable, out string errMsg)
 {
     try
     {
         Directory.CreateDirectory(BaseDir);
         string fileName = Path.Combine(BaseDir, baseTable.FileName);
         baseTable.Save(fileName);
         errMsg = "";
         return(true);
     }
     catch (Exception ex)
     {
         errMsg = string.Format(AdminPhrases.SaveBaseTableError, baseTable.Title) + ":" + ex.Message;
         return(false);
     }
 }
示例#2
0
 /// <summary>
 /// Saves the specified table of the configuration database.
 /// </summary>
 public bool SaveTable(IBaseTable baseTable, out string errMsg)
 {
     try
     {
         Directory.CreateDirectory(BaseDir);
         string fileName = Path.Combine(BaseDir, baseTable.FileName);
         baseTable.Save(fileName);
         errMsg = "";
         return(true);
     }
     catch (Exception ex)
     {
         errMsg = ScadaUtils.BuildErrorMessage(ex, AdminPhrases.SaveBaseTableError, baseTable.Title);
         return(false);
     }
 }