Exemplo n.º 1
0
        protected void FullRegion_MainRegion_Save_Click(object sender, EventArgs e)
        {
           
            EmployeeSettingsModel model = new EmployeeSettingsModel()
            {
                ImportFileName = EmployeeFileName.Text,
                LocationsFileName = LocationsFileName.Text,
                ExpertiseFileName = ExpertiseFileName.Text
            };

            _handler.SaveSettings(model);

            OutputMessage.Text = "Changes have been saved.";
        }
Exemplo n.º 2
0
 public bool SaveSettings(EmployeeSettingsModel data)
 {
     DynamicDataStore store = DynamicDataStoreFactory.Instance.GetStore(StoreName);
     if (store == null)
     {
         store = DynamicDataStoreFactory.Instance.CreateStore(StoreName, typeof(EmployeeSettingsModel));
     }
     else
     {
         store.DeleteAll();
     }
     Identity id = store.Save(data);
     return (id.ExternalId != Guid.Empty);
 }