made pop up work

This commit is contained in:
caschick221 2024-03-21 14:09:34 -04:00
parent fb27c94b95
commit 995a4b9de5
2 changed files with 16 additions and 16 deletions

View File

@ -46,7 +46,7 @@ namespace CH78
public void GetStudent(string studentid, string type)
{
// the right record
StudentDataTier stuDT = new StudentDataTier();
DataSet ds = new DataSet();
string gender;
ds = StudentDataTier.SearchStudents("","",studentid);
@ -57,15 +57,15 @@ namespace CH78
txtLNAME.Text = ds.Tables[0].Rows[0]["lname"].ToString();
// TODO complete other fields
gender = ds.Tables[0].Rows[0]["gender_desc"].ToString().Trim();
if (gender.ToUpper() == "F")
{
txtGender.SelectedItem.Text = "FEMALE";
}
else
{
txtGender.SelectedItem.Text = "MALE";
}
gender = ds.Tables[0].Rows[0]["GENDER"].ToString().Trim();
// if (gender.ToUpper() == "F")
// {
// txtGender.SelectedItem.Text = "FEMALE";
// }
// else
// {
// txtGender.SelectedItem.Text = "MALE";
// }
txtGender.Enabled = false;
//mysalary = Decimal.Parse(ds.Tables[0].Rows[0]["salary"])
@ -73,12 +73,12 @@ namespace CH78
//txtSalary.Enabled = False
txtState.DataSource = StudentDataTier.GetStates();
txtState.DataTextField = "FullAndAbbrev";
txtState.DataValueField = "abbreviation";
txtState.SelectedValue = "PA";
txtState.DataTextField = "Name";
txtState.DataValueField = "StateID";
txtState.SelectedValue = "1";
txtState.DataBind();
txtState.SelectedValue = ds.Tables[0].Rows[0]["state"].ToString();
// txtState.SelectedValue = ds.Tables[0].Rows[0]["state"].ToString();
if (type.ToUpper() == "VIEW")
{
txtStuID.Enabled = false;

View File

@ -210,8 +210,8 @@ namespace CH78
// this script will open a popup
sb.Append("<script language='javascript'>");
sb.Append("window.open('Display.aspx?ID=" + recordToBeEdited.ToString() + "&typeEdit=" + "'DisplayEdit';");
sb.Append(", 'width=525, height=525, menubar=no, resizable=yes, left=50, top=50, scrollbars=yes');");
sb.Append("window.open('Display.aspx?ID=" + recordToBeEdited.ToString() + "&type=Edit" +"' , 'DisplayEdit',");
sb.Append("'width=525, height=525, menubar=no, resizable=yes, left=50, top=50, scrollbars=yes');");
sb.Append("</script>");
// register with ClientScript