예제 #1
0
    protected void onUpdate(object source, CommandEventArgs e)
    {
        HiddenFlag.Value = "Edit";
        OperationMode    = "Edit Bunker Testing Lab";

        DataTable dt = new DataTable();

        Selected_ID.Value = e.CommandArgument.ToString();
        dt = objBLL.Get_BunkerTestingLabByID(UDFLib.ConvertToInteger(e.CommandArgument.ToString()), GetSessionUserID());
        if (dt.Rows.Count > 0)
        {
            txtLabName.Text = dt.Rows[0]["COMPANY_NAME"].ToString();
            txtAddress.Text = dt.Rows[0]["ADDRESS"].ToString();
            txtEmail.Text   = dt.Rows[0]["EMAIL1"].ToString();
            txtPhone.Text   = dt.Rows[0]["PHONE1"].ToString();
            if (dt.Rows[0]["Country"].ToString() != null && dt.Rows[0]["Country"].ToString() != "")
            {
                ddlAddCountry.SelectedValue = dt.Rows[0]["Country"].ToString();
            }
            string js = String.Format("showModal('divadd',false);");
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Deptmodal", js, true);
        }
    }