Exemplo n.º 1
0
        protected void AddCompanyButton_Click(object sender, EventArgs e)
        {
            try
            {
                CompanyModel companymodel = new CompanyModel()
                {
                    Employer_Name  = Employer_NameTextBox.Text,
                    Contact_Number = Convert.ToInt64(Contact_NumberTextBox.Text),
                    Location       = LocationTextBox.Text,
                    Website        = WebsiteTextBox.Text,
                };
                CompanyAccess companydata = new CompanyAccess();
                string        SaveComp    = companydata.SaveCompany1(companymodel);
                if (SaveComp.Equals("Success"))

                {
                    Response.Write("<script>alert('Details have been saved successfully');</script>");
                }
            }
            catch (Exception ex)
            {
                Response.Write("<script>alert(('Please enter the values: '" + ex.Message + ");/script>");
            }
        }