Example #1
0
        private void BindGrid()
        {
            CountryMasterDataService countryDs   = new CountryMasterDataService();
            List <CountryMaster>     countryList = countryDs.Country_RetrieveAll();

            dataGrid1.ItemsSource = countryList;
            countryList           = null;
            countryDs             = null;
        }
Example #2
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            CountryMasterDataService countryDs = new CountryMasterDataService();
            CountryMaster            countryBL = new CountryMaster();

            countryBL.CountryId   = -1;
            countryBL.CountryCode = txtCCode.Text;
            countryBL.CountryName = txtCname.Text;
            countryBL.ISDNo       = txtISDCode.Text;
            List <CountryMaster> countryList = countryDs.Country_Insert(countryBL);

            dataGrid1.ItemsSource = countryList;
            countryBL             = null;
            countryList           = null;
            countryDs             = null;
        }