コード例 #1
0
    protected void btnEmp_Click(object sender, EventArgs e)
    {
        try
        {
            ClsBAL obj = new ClsBAL();
            string filename = Path.GetFileName(fuImage.PostedFile.FileName);
            fuImage.SaveAs(Server.MapPath("~/saveresumes/" + filename));
            string pathname = "~/saveresumes/" + filename;

            string filename1 = Path.GetFileName(FileUpload1.PostedFile.FileName);
            FileUpload1.SaveAs(Server.MapPath("~/savedocs/" + filename1));
            string pathname1 = "~/savedocs/" + filename1;

            lblEmp.Text = obj.InsertEmpRequest(txtEmpName.Text.ToString(), txtEmpEmail.Text.ToString(), "", txtEmpMobileNo.Text.ToString(),
                txtEmpCity.Text.ToString(), ddlState.SelectedItem.Text.ToString(), "", "", "Emp", "", "", "", filename, pathname, filename1, pathname1,txtQualification.Text,txtEmpAddress.Text);

            lblEmp.ForeColor = System.Drawing.Color.Green;
            txtEmpName.Text = txtEmpEmail.Text = txtEmpMobileNo.Text = txtEmpCity.Text = txtCorCity.Text = txtComments.Text = txtCorDist.Text =txtEmpAddress.Text= txtEmpPinCode.Text=txtQualification.Text="";
            ddlState.ClearSelection();
            ddlEmpcountry.ClearSelection();

        }
        catch (Exception ex)
        {
            lblMsg.Text = ex.Message;
            throw;
        }
    }