예제 #1
0
    protected void BtnRegister_Click(object sender, EventArgs e)
    {
        obj.EmpName       = TxtName.Text;
        obj.Surname       = TxtSurName.Text;
        obj.Address       = TxtAddress.Text;
        obj.City          = DdlCity.SelectedItem.ToString();
        obj.State         = DdlState.SelectedItem.ToString();
        obj.ZipCode       = Convert.ToInt32(TxtZipCode.Text);
        obj.WorkOnVehicle = int.Parse(TxtWorkOnVehicle.Text);
        obj.Salary        = Convert.ToInt16(TxtSalary.Text);
        obj.JobDesc       = TxtJobDesc.Text;
        obj.InsertEmployee();

        ClsLogin log = new ClsLogin();

        log.UserName = TxtName.Text;
        log.PassWord = TxtPassWord.Text;
        log.InserUser();
        LblMessage.Visible = true;
        LblMessage.Text    = "Employee Successfully Registered...";
        Page.RegisterClientScriptBlock("Dhanush", "<script>alert('Registered Successfully..')</script>");
        GetData();
    }