got it to fill all fields
This commit is contained in:
parent
995a4b9de5
commit
adecd7bda0
@ -155,7 +155,7 @@
|
||||
<virtualDirectoryDefaults allowSubDirConfig="true" />
|
||||
<site name="CNSA-216-Personal-v2" id="1">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\caschick221\RiderProjects\CNSA-216-Personal-v2\CNSA-216-Personal-v2" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\eggman\Nextcloud\TSCT\2nd Year\SEM 4\RiderProjects\CNSA-216-Personal-v2\CNSA-216-Personal-v2" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:5000:localhost" />
|
||||
@ -163,7 +163,7 @@
|
||||
</site>
|
||||
<site name="CH2" id="2">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\caschick221\RiderProjects\CNSA-216-Personal-v2\CH2" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\eggman\Nextcloud\TSCT\2nd Year\SEM 4\RiderProjects\CNSA-216-Personal-v2\CH2" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:5000:localhost" />
|
||||
@ -171,7 +171,7 @@
|
||||
</site>
|
||||
<site name="Scripting" id="3">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\caschick221\RiderProjects\CNSA-216-Personal-v2\Scripting" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\eggman\Nextcloud\TSCT\2nd Year\SEM 4\RiderProjects\CNSA-216-Personal-v2\Scripting" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:5000:localhost" />
|
||||
@ -179,7 +179,7 @@
|
||||
</site>
|
||||
<site name="CH456" id="4">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\caschick221\RiderProjects\CNSA-216-Personal-v2\CH456" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\eggman\Nextcloud\TSCT\2nd Year\SEM 4\RiderProjects\CNSA-216-Personal-v2\CH456" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:5000:localhost" />
|
||||
@ -187,7 +187,7 @@
|
||||
</site>
|
||||
<site name="masterpage" id="5">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\caschick221\RiderProjects\CNSA-216-Personal-v2\masterpage" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\eggman\Nextcloud\TSCT\2nd Year\SEM 4\RiderProjects\CNSA-216-Personal-v2\masterpage" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:5000:localhost" />
|
||||
@ -195,7 +195,7 @@
|
||||
</site>
|
||||
<site name="CH46" id="6">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\caschick221\RiderProjects\CNSA-216-Personal-v2\CH46" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\eggman\Nextcloud\TSCT\2nd Year\SEM 4\RiderProjects\CNSA-216-Personal-v2\CH46" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:5000:localhost" />
|
||||
@ -203,7 +203,7 @@
|
||||
</site>
|
||||
<site name="CH78" id="7">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\caschick221\RiderProjects\CNSA-216-Personal-v2\CH78" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\eggman\Nextcloud\TSCT\2nd Year\SEM 4\RiderProjects\CNSA-216-Personal-v2\CH78" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:5000:localhost" />
|
||||
|
@ -55,6 +55,15 @@ namespace CH78
|
||||
txtStuID.Text = ds.Tables[0].Rows[0]["student_id"].ToString();
|
||||
txtFNAME.Text = ds.Tables[0].Rows[0]["fname"].ToString();
|
||||
txtLNAME.Text = ds.Tables[0].Rows[0]["lname"].ToString();
|
||||
txtMidInit.Text = ds.Tables[0].Rows[0]["midinit"].ToString();
|
||||
txtDOB.Text = ds.Tables[0].Rows[0]["DOB"].ToString();
|
||||
txtActBal.Text = ds.Tables[0].Rows[0]["ACCT_BAL"].ToString();
|
||||
txtMajor.Text = ds.Tables[0].Rows[0]["MAJOR"].ToString();
|
||||
txtCellPhone.Text = ds.Tables[0].Rows[0]["CELL_PHONE"].ToString();
|
||||
txtAdr1.Text = ds.Tables[0].Rows[0]["ADDRESS_ONE"].ToString();
|
||||
txtCity.Text = ds.Tables[0].Rows[0]["CITY"].ToString();
|
||||
txtZip.Text = ds.Tables[0].Rows[0]["ZIP"].ToString();
|
||||
txtCreds.Text = ds.Tables[0].Rows[0]["TOTALCREDITS"].ToString();
|
||||
// TODO complete other fields
|
||||
|
||||
gender = ds.Tables[0].Rows[0]["GENDER"].ToString().Trim();
|
||||
@ -78,6 +87,12 @@ namespace CH78
|
||||
txtState.SelectedValue = "1";
|
||||
txtState.DataBind();
|
||||
|
||||
txtGender.DataSource = StudentDataTier.GetGenders();
|
||||
txtGender.DataTextField = "CommonName";
|
||||
txtGender.DataValueField = "Gender_ID";
|
||||
txtGender.SelectedValue = "0";
|
||||
txtGender.DataBind();
|
||||
|
||||
// txtState.SelectedValue = ds.Tables[0].Rows[0]["state"].ToString();
|
||||
if (type.ToUpper() == "VIEW")
|
||||
{
|
||||
|
@ -103,6 +103,42 @@ namespace CH78
|
||||
myConn.Close();
|
||||
}
|
||||
}
|
||||
|
||||
public static DataSet GetGenders()
|
||||
{
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
// open connection
|
||||
myConn.Open();
|
||||
//clear any parameters
|
||||
cmdString.Parameters.Clear();
|
||||
// command
|
||||
cmdString.Connection = myConn;
|
||||
cmdString.CommandType = CommandType.StoredProcedure;
|
||||
cmdString.CommandTimeout = 1500;
|
||||
cmdString.CommandText = "GetAllGenders";
|
||||
// adapter and dataset
|
||||
SqlDataAdapter aAdapter = new SqlDataAdapter();
|
||||
aAdapter.SelectCommand = cmdString;
|
||||
DataSet aDataSet = new DataSet();
|
||||
|
||||
// fill adapter
|
||||
aAdapter.Fill(aDataSet);
|
||||
|
||||
// return dataSet
|
||||
return aDataSet;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new ArgumentException(ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
myConn.Close();
|
||||
}
|
||||
}
|
||||
|
||||
public static DataSet SearchStudents(string fname, string lname, string stuID)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user