|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: 197: 198: 199: 200: 201: 202: 203: 204: 205: 206: 207: 208: 209: 210: 211: 212: 213: 214: 215: 216: 217: 218: 219: 220: 221: 222: 223: 224: 225: 226: 227: 228: 229: 230: 231: 232: 233: 234: 235: 236: 237: 238: 239: 240: 241: 242: 243: 244: 245: 246: 247: 248: 249: 250: 251: 252: 253: 254: 255: 256: 257: 258: 259: 260: 261: 262: 263: 264: 265: 266: 267: 268: 269: 270: 271: 272: 273: 274: 275: 276: 277: 278: 279: 280: 281: 282: 283: 284: 285: 286: 287: 288: 289: 290: 291: 292: 293: 294: 295: 296: 297: 298: 299: 300: 301: 302: 303: 304: 305: 306: 307: 308: 309: |
default.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Theme="Theme1" Inherits="add_account_excel._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Zone Manager New Department Request Form </title>
<link href="default.css" rel="stylesheet" type="text/css" />
<meta content="True" name="vs_snapToGrid" />
<meta content="True" name="vs_showGrid" />
<meta content="JavaScript" name="vs_defaultClientScript" />
</head>
<body>
<form id="form1" method="post" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div class="header_container">
<asp:Image ID="Logo" runat="server" ImageUrl="~/images/wfubmclogo.jpg" />
<asp:Label ID="lblGold" runat="server" Text="zone manager"></asp:Label>
<asp:Label ID="lblBlack" runat="server" Text="New Department Request Form"></asp:Label>
</div><!-- end #header-containter -->
<div id="wrapper">
<div id="content">
<div class="main-container">
<div id="right">
<asp:Label ID="Label2" runat="server" Text="Department Name:"></asp:Label><br />
<asp:TextBox ID="TextBox2" tabindex="2" runat="server"></asp:TextBox><br />
<asp:Label ID="label19" runat="server" Text="Example: Dermatology" Font-Size="Smaller"></asp:Label><br /><br />
<asp:Label ID="Label4" runat="server" Text="Department OU:"></asp:Label><br />
<asp:TextBox ID="TextBox4" tabindex="4" runat="server"></asp:TextBox><br />
<asp:Label ID="label21" runat="server" Text="Example: Derm_1530_Dermatology" Font-Size="Smaller"></asp:Label><br /><br />
<asp:Label ID="Label6" runat="server" Text="Groups:"></asp:Label><br />
<asp:TextBox ID="TextBox6" tabindex="6" runat="server"></asp:TextBox><br />
<asp:Label ID="label23" runat="server" Text="Example: Dermatology" Font-Size="Smaller"></asp:Label><br /><br />
<asp:Label ID="Label8" runat="server" Text="Admin Contact Phone:"></asp:Label><br />
<asp:TextBox ID="TextBox8" tabindex="8" runat="server"></asp:TextBox><br /><br />
<asp:Label ID="Label10" runat="server" Text="Zone Manager:"></asp:Label><br />
<asp:TextBox ID="TextBox10" tabindex="10" runat="server"></asp:TextBox><br /><br />
<div class="right-container">Right</div>
</div> <!-- end #right -->
<div id="left">
<asp:Label ID="Label1" runat="server" Text="Department Number:"></asp:Label><br />
<asp:TextBox ID="TextBox1" tabindex="1" runat="server"></asp:TextBox><br />
<asp:Label ID="label18" runat="server" Text="Example: 153000" Font-Size="Smaller"></asp:Label><br /><br />
<asp:Label ID="Label3" runat="server" Text="Institution OU:"></asp:Label><br />
<asp:TextBox ID="TextBox3" tabindex="3" runat="server"></asp:TextBox><br />
<asp:Label ID="label20" runat="server" Text="Example: School or Hospital" Font-Size="Smaller"></asp:Label><br /><br />
<asp:Label ID="Label5" runat="server" Text="Home Directory Location:"></asp:Label><br />
<asp:TextBox ID="TextBox5" tabindex="5" runat="server"></asp:TextBox><br />
<asp:Label ID="label22" runat="server" Text="Example: \\csb1\csderm$" Font-Size="Smaller"></asp:Label><br /><br />
<asp:Label ID="Label7" runat="server" Text="Admin Contact Name:"></asp:Label><br />
<asp:TextBox ID="TextBox7" tabindex="7" runat="server"></asp:TextBox><br /><br />
<asp:Label ID="Label9" runat="server" Text="Admin Contact Email:"></asp:Label><br />
<asp:TextBox ID="TextBox9" tabindex="9" runat="server"></asp:TextBox><br /><br />
<div class="left-container">LEFT</div>
</div> <!-- end #left-->
</div> <!-- end class main-container -->
<div class="bottom-container">
<div class="label-container">
<asp:Label ID="lblResults" runat="server"></asp:Label>
</div> <!-- end class label-container -->
<div class="image-container">
<asp:Image ID="imgCheckMark" runat="server"
ImageUrl="~/images/checkmark_Bold_Brush_Green.png" Height="30px"/>
<asp:Image ID="imgRedX" runat="server" ImageUrl="~/images/red_X.jpg" Height="30px"/>
</div><!-- end class image container -->
<div class="button-container">
<asp:Button ID="Clear" tabindex="-1" runat="server" Text="Clear" />
<asp:Button ID="Submit" tabindex="-1" runat="server" Text="Submit" />
<asp:Button ID="View" tabindex="-1" runat="server" Text="View File" />
</div><!-- end button-container -->
</div> <!-- end class bottom-container -->
</div><!-- end #content -->
<div id="footer">
<asp:Label ID="Label17" runat="server" Text=" Requested by: "></asp:Label>
<asp:Label ID="Label16" runat="server"></asp:Label><br /><br /><br />
</div>
</div><!-- end #wrapper -->
<div class="gridview-container">
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:MyConnection2 %>"
SelectCommand="SELECT * FROM [Automated_ZM_Dept_Request]">
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" Wrap="False" AllowSorting="True" ForeColor="Black" ShowFooter="True" CellPadding="4"
BackColor="White" BorderWidth="1px" BorderStyle="None" BorderColor="#CCCCCC" Height="135px">
<HeaderStyle Font-Bold="true" Wrap="false" ForeColor="White" BackColor="#333333" />
<FooterStyle Font-Bold="true" Wrap="false" ForeColor="White" BackColor="#333333" />
<AlternatingRowStyle Font-Bold="True" Wrap="False" ForeColor="black" BackColor="#CCCC99"></AlternatingRowStyle>
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField HeaderText="Dept ID" DataField="Dept ID" SortExpression="Dept ID" />
<asp:BoundField HeaderText="Dept" DataField="Dept" SortExpression="Dept" />
<asp:BoundField HeaderText="Inst OU" DataField="Inst OU" SortExpression="[Inst OU]" />
<asp:BoundField HeaderText="Home Dir" DataField="Home Dir" SortExpression="[Home Dir]" />
<asp:BoundField HeaderText="Groups" DataField="Groups" SortExpression="[Groups]" />
<asp:BoundField HeaderText="Contact" DataField="Contact" SortExpression="[Contact]" />
<asp:BoundField HeaderText="Phone" DataField="Phone" SortExpression="[Phone]" />
<asp:BoundField HeaderText="Email" DataField="Email" SortExpression="[Email]" />
<asp:BoundField HeaderText="Zone Mgr" DataField="Zone Mgr" SortExpression="[Zone Mgr]" />
<asp:BoundField HeaderText="Submitted" DataField="Submitted" SortExpression="[Submitted]" />
<asp:BoundField HeaderText="Requestor" DataField="Requestor" SortExpression="[Requestor]" />
</Columns>
</asp:GridView>
</div> <!-- end gridview-container -->
</form>
</body>
</html>
aspx.vb
Imports System
Imports System.Data
Imports System.Data.OleDb
Imports System.Data.SqlClient
Imports System.DirectoryServices
Imports System.Collections
Imports System.Collections.Specialized
Namespace add_account_excel
Partial Public Class _Default
Inherits System.Web.UI.Page
Dim strUser As String
Dim strDate As String
Dim DS As System.Data.DataSet
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
lblResults.Visible = False
imgCheckMark.Visible = False
imgRedX.Visible = False
strUser = (Request.ServerVariables("AUTH_USER"))
If InStr(strUser, "domain\") Then
strUser = Replace(strUser, "domain\", "")
End If
If InStr(strUser, "domain\") Then
strUser = Replace(strUser, "domain\", "")
End If
Label16.Text = strUser
Call getDatafromfile()
End Sub
Sub getDatafromfile()
Dim sConn As SqlConnection
Dim sComm As SqlCommand
Dim sAdapt As SqlDataAdapter
sConn = New Data.SqlClient.SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("MyConnection").ConnectionString)
sComm = New SqlCommand("select * from Automated_ZM_Dept_Request", sConn)
sAdapt = New SqlDataAdapter(sComm)
sConn.Open()
DS = New DataSet
sAdapt.Fill(DS)
GridView1.DataSource = DS
GridView1.DataBind()
sConn.Close()
End Sub
Protected Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click
Dim strDate As String
strDate = DateString & "@" & TimeString
If TextBox1.Text = "" Then
lblResults.Visible = True
imgCheckMark.Visible = False
imgRedX.Visible = True
lblResults.Text = "Please enter 'Department ID'"
ElseIf TextBox2.Text = "" Then
lblResults.Visible = True
imgCheckMark.Visible = False
imgRedX.Visible = True
lblResults.Text = "Please enter 'Department Name'"
ElseIf TextBox3.Text = "" Then
lblResults.Visible = True
imgCheckMark.Visible = False
imgRedX.Visible = True
lblResults.Text = "Please enter 'Institution OU'"
ElseIf TextBox4.Text = "" Then
lblResults.Visible = True
imgCheckMark.Visible = False
imgRedX.Visible = True
lblResults.Text = "Please enter 'Department OU'"
ElseIf TextBox5.Text = "" Then
lblResults.Visible = True
imgCheckMark.Visible = False
imgRedX.Visible = True
lblResults.Text = "Please enter 'Home Directory Location'"
ElseIf TextBox6.Text = "" Then
lblResults.Visible = True
imgCheckMark.Visible = False
imgRedX.Visible = True
lblResults.Text = "Please enter 'Groups'"
ElseIf TextBox7.Text = "" Then
lblResults.Visible = True
imgCheckMark.Visible = False
imgRedX.Visible = True
lblResults.Text = "Please enter 'Admin Contact'"
ElseIf TextBox8.Text = "" Then
lblResults.Visible = True
imgCheckMark.Visible = False
imgRedX.Visible = True
lblResults.Text = "Please enter 'Phone Number'"
ElseIf TextBox9.Text = "" Then
lblResults.Visible = True
imgCheckMark.Visible = False
imgRedX.Visible = True
lblResults.Text = "Please enter 'Contact Email'"
ElseIf TextBox10.Text = "" Then
lblResults.Visible = True
imgCheckMark.Visible = False
imgRedX.Visible = True
lblResults.Text = "Please enter 'Zone Manager'"
Else
lblResults.Visible = True
imgCheckMark.Visible = True
imgRedX.Visible = False
lblResults.Text = "New Department Request Submitted"
Call Add_SQL()
End If
End Sub
Public Sub Add_SQL()
Dim sConn As Data.SqlClient.SqlConnection
Dim sComm As Data.SqlClient.SqlCommand
Dim sAdapt As Data.SqlClient.SqlDataAdapter
sConn = New Data.SqlClient.SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("MyConnection").ConnectionString)
sComm = New Data.SqlClient.SqlCommand("INSERT INTO Automated_ZM_Dept_Request ([Dept ID], Dept, [Dept OU], [Inst OU], [Home Dir], Groups, Contact, Phone, Email, [Zone Mgr], Submitted, Requestor) VALUES ('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & "','" & TextBox7.Text & "','" & TextBox8.Text & "','" & TextBox9.Text & "','" & TextBox10.Text & "','" & strDate & "','" & strUser & "')", sConn)
sAdapt = New Data.SqlClient.SqlDataAdapter(sComm)
sConn.Open()
sComm.ExecuteNonQuery()
sConn.Close()
clrFields()
getDatafromfile()
End Sub
Sub clrFields()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
lblResults.Visible = True
imgCheckMark.Visible = True
imgRedX.Visible = False
lblResults.Text = "New Department Request Submitted"
End Sub
Protected Sub Clear_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Clear.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
lblResults.Visible = False
imgCheckMark.Visible = False
imgRedX.Visible = False
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles View.Click
lblResults.Text = Nothing
getDatafromfile()
End Sub
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
End Sub
End Class
End Namespace
|
Advertisement
| Hall of Fame |