Example #1
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        string    strCityText = txtCityText.Text.Replace(Environment.NewLine, "<br />");
        DataTable dt          = VADBCommander.CityTextByCountyInd(countyID.ToString());

        try
        {
            if (dt.Rows.Count > 0)
            {
                VADBCommander.CityTextByCountyEdit(countyID.ToString(), strCityText);
            }
            else
            {
                VADBCommander.CityTextByCountyAdd(countyID.ToString(), strCityText);
            }
            lblInfo.Text = "Data saved.";
        }
        catch (Exception ex)
        {
            lblInfo.Text = ex.Message;
        }
    }