Exemple #1
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         CustomList <DataCaptureConfiguration> lstDataCaptureConfiguration     = DataCaptureConfigurationList;
         CustomList <DataCaptureConfiguration> lstSaveDataCaptureConfiguration = lstDataCaptureConfiguration.FindAll(f => f.IsCapture || f.IsRate || f.IsFixed);
         lstSaveDataCaptureConfiguration.ForEach(f => f.SetAdded());
         CustomList <DataCaptureConfiguration> DeletedList = new CustomList <DataCaptureConfiguration>();
         foreach (DataCaptureConfiguration DCC in lstDataCaptureConfiguration)
         {
             DataCaptureConfiguration newObj = new DataCaptureConfiguration();
             newObj.Field = DCC.Field;
             newObj.Delete();
             DeletedList.Add(newObj);
         }
         if (!CheckUserAuthentication(lstSaveDataCaptureConfiguration, DeletedList))
         {
             return;
         }
         manager.SaveDataCaptureConfiguration(ref DeletedList, ref lstSaveDataCaptureConfiguration);
         this.SuccessMessage = (StaticInfo.SavedSuccessfullyMsg);
     }
     catch (SqlException ex)
     {
         this.ErrorMessage = (ExceptionHelper.getSqlExceptionMessage(ex));
     }
     catch (Exception ex)
     {
         this.ErrorMessage = (ExceptionHelper.getExceptionMessage(ex));
     }
 }
 public CustomList <DataCaptureConfiguration> GetAllDataCaptureConfigurationForDataCapture()
 {
     return(DataCaptureConfiguration.GetAllDataCaptureConfigurationForDataCapture());
 }