Ejemplo n.º 1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        int res_id = 0;

        if (HiddenFlag.Value == "Add")
        {
            res_id = BLL_OPS_BunkerAnalysis.Insert_LO_Testing_Lab(txtLabName.Text.Trim(), txtAddress.Text.Trim(), txtEmail.Text.Trim(), txtPhone.Text.Trim(), int.Parse(ddlAddCountry.SelectedValue), GetSessionUserID());
        }
        else
        {
            res_id = BLL_OPS_BunkerAnalysis.Update_LO_Testing_Lab(UDFLib.ConvertToInteger(Selected_ID.Value), txtLabName.Text.Trim(), txtAddress.Text.Trim(), txtEmail.Text.Trim(), txtPhone.Text.Trim(), UDFLib.ConvertToInteger(ddlAddCountry.SelectedValue), GetSessionUserID());
        }
        if (res_id > 0)
        {
            Bind_LOTestingLabs();
            string hidemodal = String.Format("hideModal('divadd')");
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "hidemodal", hidemodal, true);
        }
    }