Search Results

Search found 2 results on 1 pages for 'skm'.

Page 1/1 | 1 

  • Using ObjectBindingDatasource to bind to object exposing Lists, cant drag and drop fields onto repor

    - by SKM
    Hey Guys Ive used the ObjectBindingDatasource to bind to a class Ive called "ReportViewModel" which contains properties such as List Companies {get; set;} List Managers {get; set;} in its constructor Im just calling a method to populate with dummy data Managers = new ReportDataRepository().GetManagers(); Companies = new ReportDataReposiroty().GetCompanies(); ... When i create the new Datasource , it shows the ReportViewModel class with the Lists under it. I expand the Companies object and attempt draging and dropping fields onto the report designer and it works. Though doesnt allow me to drag and drop for any other List. Any guidance would be really appreciated.

    Read the article

  • C# why unit test has this strange behaviour?

    - by 5YrsLaterDBA
    I have a class to encrypt the connectionString. public class SKM { private string connStrName = "AndeDBEntities"; internal void encryptConnStr() { if(isConnStrEncrypted()) return; ... } private bool isConnStrEncrypted() { bool status = false; // Open app.config of executable. System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); // Get the connection string from the app.config file. string connStr = config.ConnectionStrings.ConnectionStrings[connStrName].ConnectionString; status = !(connStr.Contains("provider")); Log.logItem(LogType.DebugDevelopment, "isConnStrEncrypted", "SKM::isConnStrEncrypted()", "isConnStrEncrypted=" + status); return status; } } Above code works fine in my application. But not in my unit test project. In my unit test project, I test the encryptConnStr() method. it will call isConnStrEncrypted() method. Then exception (null pointer) will be thrown at this line: string connStr = config.ConnectionStrings.ConnectionStrings[connStrName].ConnectionString; I have to use index like this to pass the unit test: string connStr = config.ConnectionStrings.ConnectionStrings[0].ConnectionString; I remember it worked several days ago at the time I added above unit test. But now it give me an error. The unit test is not integrated with our daily auto build yet. We only have ONE connectionStr. It works with product but not in unit test. Don't know why. Anybody can explain to me?

    Read the article

1