Ejemplo n.º 1
0
 // Reset Section
 private void Reset()
 {
     dgvCountry.DataSource = CountryDA.GetCountries();
     textName.Clear();
     textDes.Clear();
     textName.Focus();
 }
Ejemplo n.º 2
0
        public IActionResult GetCountries()
        {
            List <CountryModel> countries = new List <CountryModel>();
            var dt = CountryDA.GetCountries();

            foreach (DataRow dataRow in dt.Rows)
            {
                CountryModel countryModel = new CountryModel();
                countryModel.CountryId   = Convert.ToInt32(dataRow["CountryId"]);
                countryModel.CountryName = dataRow["CountryName"].ToString();
                countryModel.Description = dataRow.IsNull("Description") ? null : dataRow["Description"].ToString();
                countryModel.CreatedDate = dataRow["CreatedDate"].ToString();
                countries.Add(countryModel);
            }
            return(Ok(countries));
        }
Ejemplo n.º 3
0
 public void Reset()
 {
     gdvCountry.DataSource = CountryDA.GetCountries();
     gdvCountry.DataBind();
 }