.
.
Sunday, February 27, 2011
Saturday, February 26, 2011
Working - Razor Syntax in C Sharp - Web-Based Database - Microsoft Server 2008
@if (!WebSecurity.IsAuthenticated) {
Response.Redirect("~/Account/Login");
}
@{
Layout = "~/_SiteLayout.cshtml";
PageData["Title"] = "Permitted Users Only";
}
@if ( Roles.IsUserInRole("power")) {
<span> Welcome <b>@WebSecurity.CurrentUserName</b>! </span>
}
else {
Response.Redirect("~/UnAuthorized");
}
@{
var db = Database.Open("snakeConnection");
var FName = Request["FName"];
var MName = Request["MName"];
var LName = Request["LName"];
var RefBy = Request["RefBy"];
var Age = Request["Age"];
var Gender = Request["Gender"];
var Street = Request["Street"];
var City = Request["City"];
var State = Request["State"];
var Zip = Request["Zip"];
var Phone1 = Request["Phone1"];
var Phone2 = Request["Phone2"];
var Email = Request["Email"];
var DateVisit = Request["DateVisit"];
var HABenefit = Request["HABenefit"];
var BenefitYN = Request["BenefitYN"];
var HABenWhom = Request["HABenWhom"];
var IPA = Request["IPA"];
var HMO = Request["HMO"];
var CPTCode = Request["CPTCode"];
var ICD9Code = Request["ICD9Code"];
var GrossSale = Request["GrossSale"];
var COGS = Request["COGS"];
var TDate = Request["TDate"];
var Brand = Request["Brand"];
var Model = Request["Model"];
var PayMethod = Request["PayMethod"];
var PayPocketAmt = Request["PayPocketAmt"];
var PayInsAmt = Request["PayInsAmt"];
var WDamageB = Request["WDamageB"];
var WDamageE = Request["WDamageE"];
var WRepairB = Request["WRepairB"];
var WRepairE = Request["WRepairE"];
if (IsPost) {
// Read product name.
FName = Request["FName"];
if (FName.IsEmpty()) {
ModelState.AddError("FName", "First name is required.");
}
MName = Request["MName"];
if (MName.IsEmpty())
{
ModelState.AddError("MName", "Middle name is required.");
}
// Read product description.
LName = Request["LName"];
if (LName.IsEmpty()) {
ModelState.AddError("LName",
"Last Name is required.");
}
// Read product price
RefBy = Request["RefBy"];
if (RefBy.IsEmpty()) {
ModelState.AddError("RefBy", "Referred by is required.");
}
// Define the insert query. The values to assign to the
// columns in the Product table are defined as parameters
// with the VALUES keyword.
if(ModelState.IsValid) {
var insertQuery1 = "INSERT INTO dbo.Patients (FName, MName, LName, RefBy, Age, Gender, Street, City, State, Zip, Phone1, Phone2, Email) " +
"VALUES (@0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11, @12)";
db.Execute(insertQuery1, FName, MName, LName, RefBy, Age, Gender, Street, City, State, Zip, Phone1, Phone2, Email);
var insertQuery2 = "INSERT INTO dbo.Referrals (LName, RefBy, DateVisit, HABenefit, HABenWhom, IPA, HMO, CPTCode, ICD9Code) " +
"VALUES (@0, @1, @2, @3, @4, @5, @6, @7, @8)";
db.Execute(insertQuery2, LName, RefBy, DateVisit, HABenefit, HABenWhom, IPA, HMO, CPTCode, ICD9Code);
var insertQuery3 = "INSERT INTO dbo.financials (LName, GrossSale, COGS, TDate, Brand, Model, PayMethod, PayPocketAmt, PayInsAmt, WDamageB, WDamageE, WRepairB, WRepairE) " + "VALUES (@0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11, @12)";
db.Execute(insertQuery3, LName, GrossSale, COGS, TDate, Brand, Model, PayMethod, PayPocketAmt, PayInsAmt, WDamageB, WDamageE, WRepairB, WRepairE);
}
}
}
<form method="post" action="">
<table width="900" border="1">
<tr>
<td width="225"><h3 align="center">Patient</h3></td>
<td width="225">
<h3 align="center"><input type="submit" value="Submit" class="submit" style="color: Blue; width: 75; height: 35;"/></h3></td>
<td width="225"><h3 align="center">Insurance</h3></td>
<td width="225"><h3 align="center">Financials</h3></td>
</tr>
</table>
<table width="900" border="1">
<tr>
<td width="150px">First Name</td>
<td width="150px">
<input type="text" name="FName" value="" />
</td>
<td width="150px">Date of Visit</td>
<td width="150px"> <input type="text" name="DateVisit" value="" /></td>
<td width="150px">Transaction Date</td>
<td width="150px"><input type="text" name="TDate" value="" /></td>
</tr>
<tr>
<td width="150px">Middle Name</td>
<td width="150px"><input type="text" name="MName" value="" /></td>
<td width="150px">Hearing Aid Benefit</td>
<td width="150px"><input type="text" name="HABenefit" value="" /></td>
<td width="150px">Gross Sale</td>
<td width="150px"><input type="text" name="GrossSale" value="" /></td>
</tr>
<tr>
<td width="150px">Last Name</td>
<td width="150px"><input type="text" name="LName" value="" /></td>
<td width="150px">Benefit By Whom</td>
<td width="150px"> <input type="text" name="HABenWhom" value="" /></td>
<td width="150px">COGS</td>
<td width="150px"><input type="text" name="COGS" value="" /></td>
</tr>
<tr>
<td width="150px">Referred By</td>
<td width="150px"><input type="text" name="RefBy" value="" /></td>
<td width="150px">Insurer</td>
<td width="150px"><input type="text" name="HMO" value="" /></td>
<td width="150px">Brand</td>
<td width="150px"><input type="text" name="Brand" value="" /></td>
</tr>
<tr>
<td width="150px">Birth Date</td>
<td width="150px"><input type="text" name="Age" value="" /></td>
<td width="150px">IPA</td>
<td width="150px"><input type="text" name="IPA" value="" /></td>
<td width="150px">Model</td>
<td width="150px"><input type="text" name="Model" value="" /></td>
</tr>
<tr>
<td width="150px">Gender</td>
<td width="150px"><input type="text" name="Gender" value="" /></td>
<td width="150px">CPT Code</td>
<td width="150px"><input type="text" name="CPTCode" value="" /></td>
<td width="150px">Payment Method</td>
<td width="150px"><input type="text" name="PayMethod" value="" /></td>
</tr>
<tr>
<td width="150px">Street</td>
<td width="150px"><input type="text" name="Street" value="" /></td>
<td width="150px">ICD9/10 Code</td>
<td width="150px"><input type="text" name="ICD9Code" value="" /></td>
<td width="150px">Out of Pocket</td>
<td width="150px"><input type="text" name="PayPocketAmt" value="" /></td>
</tr>
<tr>
<td width="150px">City</td>
<td width="150px"><input type="text" name="City" value="" /></td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px">Insurance Portion</td>
<td width="150px"><input type="text" name="PayInsAmt" value="" /></td>
</tr>
<tr>
<td width="150px">State</td>
<td width="150px"><input type="text" name="State" value="" /></td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px">WarrantyD Begin</td>
<td width="150px"><input type="text" name="WDamageB" value="" /></td>
</tr>
<tr>
<td width="150px">Zip</td>
<td width="150px"><input type="text" name="Zip" value="" /></td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px">WarrantyD End</td>
<td width="150px"><input type="text" name="WDamageE" value="" /></td>
</tr>
<tr>
<td width="150px">Phone1</td>
<td width="150px"><input type="text" name="Phone1" value="" /></td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px">WarrantyR Begin</td>
<td width="150px"><input type="text" name="WRepairB" value="" /></td>
</tr>
<tr>
<td width="150px">Phone2</td>
<td width="150px"><input type="text" name="Phone2" value="" /></td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px">WarrantyR End</td>
<td width="150px"><input type="text" name="WRepairE" value="" /></td>
</tr>
<tr>
<td width="150px">Email</td>
<td width="150px"><input type="text" name="Email" value="" /></td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
</table>
</form>
more debugging
Server Error in '/Starter Site6' Application.
Must declare the scalar variable "@9".
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Data.SqlClient.SqlException: Must declare the scalar variable "@9".
Source Error:
Line 72: var insertQuery2 = "INSERT INTO dbo.Referrals (LName, RefBy, DateVisit, HABenefit, HABenWhom, IPA, HMO, CPTCode, ICD9Code) " +
Line 73: "VALUES (@0, @1, @2, @3, @4, @5, @6, @7, @8, @9)";
Line 74: db.Execute(insertQuery2, LName, RefBy, DateVisit, HABenefit, HABenWhom, IPA, HMO, CPTCode, ICD9Code);Line 75: }
Line 76: } |
Source File: c:\Users\edog\Documents\My Web Sites\Starter Site6\Data\EnterPatient.cshtml Line: 74
Stack Trace:
[SqlException (0x80131904): Must declare the scalar variable "@9".] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2030802 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009584 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +215 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +178 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137 WebMatrix.Data.Database.Execute(String commandText, Object[] args) +122 ASP._Page_Data_EnterPatient_cshtml.Execute() in c:\Users\edog\Documents\My Web Sites\Starter Site6\Data\EnterPatient.cshtml:74 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +207 System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +68 System.Web.WebPages.WebPage.ExecutePageHierarchy() +156 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +76 System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContext context) +249 |
more troubleshooting
Server Error in '/Starter Site6' Application.
The parameterized query '(@0 nvarchar(5),@1 nvarchar(6),@2 nvarchar(8),@3 nvarchar(7),@4 ' expects the parameter '@4', which was not supplied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Data.SqlClient.SqlException: The parameterized query '(@0 nvarchar(5),@1 nvarchar(6),@2 nvarchar(8),@3 nvarchar(7),@4 ' expects the parameter '@4', which was not supplied.
Source Error:
Line 69: var insertQuery1 = "INSERT INTO dbo.Patients (FName, MName, LName, RefBy, Age, Gender, Street, City, State, Zip, Phone1, Phone2, Email) " +
Line 70: "VALUES (@0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11, @12)";
Line 71: db.Execute(insertQuery1, FName, MName, LName, RefBy, Age, Gender, Street, City, State, Zip, Phone1, Phone2, Email);Line 72: var insertQuery2 = "INSERT INTO dbo.Referrals (LName, FName, RefBy, DateVisit, HABenefit, HABenWhom, IPA, HMO, CPTCode, ICD9Code) " +
Line 73: "VALUES (@0, @1, @2, @3, @4, @5, @6, @7, @8, @9)"; |
Source File: c:\Users\edog\Documents\My Web Sites\Starter Site6\Data\EnterPatient.cshtml Line: 71
Stack Trace:
[SqlException (0x80131904): The parameterized query '(@0 nvarchar(5),@1 nvarchar(6),@2 nvarchar(8),@3 nvarchar(7),@4 ' expects the parameter '@4', which was not supplied.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2030802 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009584 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +215 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +178 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137 WebMatrix.Data.Database.Execute(String commandText, Object[] args) +122 ASP._Page_Data_EnterPatient_cshtml.Execute() in c:\Users\edog\Documents\My Web Sites\Starter Site6\Data\EnterPatient.cshtml:71 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +207 System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +68 System.Web.WebPages.WebPage.ExecutePageHierarchy() +156 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +76 System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContext context) +249 |
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Troubleshooting
Server Error in '/Starter Site6' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.Compiler Error Message: CS0128: A local variable named 'insertQuery' is already defined in this scope
Source Error:
Line 70: "VALUES (@0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11, @12)";
Line 71: db.Execute(insertQuery, FName, MName, LName, RefBy, Age, Gender, Street, City, State, Zip, Phone1, Phone2, Email);
Line 72: var insertQuery = "INSERT INTO dbo.Referrals (LName, FName, RefBy, DateVisit, HABenefit, HABenWhom, IPA, HMO, CPTCode, ICD9Code) " +Line 73: "VALUES (@0, @1, @2, @3, @4, @5, @6, @7, @8, @9)";
Line 74: db.Execute(insertQuery, LName, FName, RefBy, DateVisit, HABenefit, HABenWhom, IPA, HMO, CPTCode, ICD9Code); |
Source File: c:\Users\edog\Documents\My Web Sites\Starter Site6\Data\EnterPatient.cshtml Line: 72
Show Detailed Compiler Output:
C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0> "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /t:library /utf8output /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Razor\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.Razor.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Web.Infrastructure\v4.0_1.0.0.0__31bf3856ad364e35\Microsoft.Web.Infrastructure.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Razor\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.Razor.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Deployment\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.Deployment.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Helpers\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.Helpers.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WebMatrix.WebData\v4.0_1.0.0.0__31bf3856ad364e35\WebMatrix.WebData.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Administration\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.Administration.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WebMatrix.Data\v4.0_1.0.0.0__31bf3856ad364e35\WebMatrix.Data.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" /out:"C:\Users\edog\AppData\Local\Temp\Temporary ASP.NET Files\starter site6\3c59e6fa\da3e6ee5\App_Web_enterpatient.cshtml.551d078a.tyxbsuzp.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701 /warnaserror- "C:\Users\edog\AppData\Local\Temp\Temporary ASP.NET Files\starter site6\3c59e6fa\da3e6ee5\App_Web_enterpatient.cshtml.551d078a.tyxbsuzp.0.cs" "C:\Users\edog\AppData\Local\Temp\Temporary ASP.NET Files\starter site6\3c59e6fa\da3e6ee5\App_Web_enterpatient.cshtml.551d078a.tyxbsuzp.1.cs" Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1 Copyright (C) Microsoft Corporation. All rights reserved. c:\Users\edog\Documents\My Web Sites\Starter Site6\Data\EnterPatient.cshtml(72,17): error CS0128: A local variable named 'insertQuery' is already defined in this scope |
Show Complete Compilation Source:
Line 1: #pragma checksum "C:\Users\edog\Documents\My Web Sites\Starter Site6\Data\EnterPatient.cshtml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "C4543F1F47CC1F064397805DEB5B5935" Line 2: //------------------------------------------------------------------------------ Line 3: // <auto-generated> Line 4: // This code was generated by a tool. Line 5: // Runtime Version:4.0.30319.1 Line 6: // Line 7: // Changes to this file may cause incorrect behavior and will be lost if Line 8: // the code is regenerated. Line 9: // </auto-generated> Line 10: //------------------------------------------------------------------------------ Line 11: Line 12: namespace ASP { Line 13: using System; Line 14: using System.Collections.Generic; Line 15: using System.IO; Line 16: using System.Linq; Line 17: using System.Net; Line 18: using System.Web; Line 19: using System.Web.Helpers; Line 20: using System.Web.Security; Line 21: using System.Web.UI; Line 22: using System.Web.WebPages; Line 23: using System.Web.WebPages.Html; Line 24: using WebMatrix.Data; Line 25: using WebMatrix.WebData; Line 26: Line 27: Line 28: public class _Page_Data_EnterPatient_cshtml : System.Web.WebPages.WebPage { Line 29: Line 30: #line hidden Line 31: Line 32: Line 33: public _Page_Data_EnterPatient_cshtml() { Line 34: } Line 35: Line 36: protected System.Web.HttpApplication ApplicationInstance { Line 37: get { Line 38: return ((System.Web.HttpApplication)(Context.ApplicationInstance)); Line 39: } Line 40: } Line 41: Line 42: public override void Execute() { Line 43: Line 44: Line 45: #line 1 "C:\Users\edog\Documents\My Web Sites\Starter Site6\Data\EnterPatient.cshtml" Line 46: Line 47: var db = Database.Open("snakeConnection"); Line 48: var FName = Request["FName"]; Line 49: var MName = Request["MName"]; Line 50: var LName = Request["LName"]; Line 51: var RefBy = Request["RefBy"]; Line 52: var Age = Request["Age"]; Line 53: var Gender = Request["Gender"]; Line 54: var Street = Request["Street"]; Line 55: var City = Request["City"]; Line 56: var State = Request["State"]; Line 57: var Zip = Request["Zip"]; Line 58: var Phone1 = Request["Phone1"]; Line 59: var Phone2 = Request["Phone2"]; Line 60: var Email = Request["Email"]; Line 61: var DateVisit = Request["DateVisit"]; Line 62: var HABenefit = Request["HABenefit"]; Line 63: var BenefitYN = Request["BenefitYN"]; Line 64: var HABenWhom = Request["HABenWhom"]; Line 65: var IPA = Request["IPA"]; Line 66: var HMO = Request["HMO"]; Line 67: var CPTCode = Request["CPTCode"]; Line 68: var ICD9Code = Request["ICD9Code"]; Line 69: var GrossSale = Request["GrossSale"]; Line 70: var COGS = Request["COGS"]; Line 71: var TDate = Request["TDate"]; Line 72: var Brand = Request["Brand"]; Line 73: var Model = Request["Model"]; Line 74: var PayMethod = Request["PayMethod"]; Line 75: var PayPocketAmt = Request["PayPocketAmt"]; Line 76: var PayInsAmt = Request["PayInsAmt"]; Line 77: var WDamageB = Request["WDamageB"]; Line 78: var WDamageE = Request["WDamageE"]; Line 79: var WRepairB = Request["WRepairB"]; Line 80: var WRepairE = Request["WRepairE"]; Line 81: Line 82: Line 83: if (IsPost) { Line 84: Line 85: // Read product name. Line 86: FName = Request["FName"]; Line 87: if (FName.IsEmpty()) { Line 88: ModelState.AddError("FName", "First name is required."); Line 89: } Line 90: Line 91: MName = Request["MName"]; Line 92: if (MName.IsEmpty()) Line 93: { Line 94: ModelState.AddError("MName", "Middle name is required."); Line 95: } Line 96: Line 97: // Read product description. Line 98: LName = Request["LName"]; Line 99: if (LName.IsEmpty()) { Line 100: ModelState.AddError("LName", Line 101: "Last Name is required."); Line 102: } Line 103: Line 104: // Read product price Line 105: RefBy = Request["RefBy"]; Line 106: if (RefBy.IsEmpty()) { Line 107: ModelState.AddError("RefBy", "Referred by is required."); Line 108: } Line 109: Line 110: // Define the insert query. The values to assign to the Line 111: // columns in the Product table are defined as parameters Line 112: // with the VALUES keyword. Line 113: if(ModelState.IsValid) { Line 114: var insertQuery = "INSERT INTO dbo.Patients (FName, MName, LName, RefBy, Age, Gender, Street, City, State, Zip, Phone1, Phone2, Email) " + Line 115: "VALUES (@0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11, @12)"; Line 116: db.Execute(insertQuery, FName, MName, LName, RefBy, Age, Gender, Street, City, State, Zip, Phone1, Phone2, Email); Line 117: var insertQuery = "INSERT INTO dbo.Referrals (LName, FName, RefBy, DateVisit, HABenefit, HABenWhom, IPA, HMO, CPTCode, ICD9Code) " + Line 118: "VALUES (@0, @1, @2, @3, @4, @5, @6, @7, @8, @9)"; Line 119: db.Execute(insertQuery, LName, FName, RefBy, DateVisit, HABenefit, HABenWhom, IPA, HMO, CPTCode, ICD9Code); Line 120: } Line 121: } Line 122: Line 123: Line 124: Line 125: #line default Line 126: #line hidden Line 127: WriteLiteral("\r\n\r\n <form method=\"post\" action=\"\">\r\n <table width=\"900\" border=\"1\">\r\n <" + Line 128: "tr>\r\n <td width=\"225\"><h3 align=\"center\">Patient</h3></td>\r\n <td width=\"22" + Line 129: "5\">\r\n <h3 align=\"center\"><input type=\"submit\" value=\"Submit\" class=\"s" + Line 130: "ubmit\" style=\"color: Blue; width: 75; height: 35;\"/></h3></td>\r\n <td width=\"2" + Line 131: "25\"><h3 align=\"center\">Insurance</h3></td>\r\n <td width=\"225\"><h3 align=\"cente" + Line 132: "r\">Financials</h3></td>\r\n </tr>\r\n </table>\r\n <table width=\"900\" border=" + Line 133: "\"1\">\r\n <tr>\r\n <td width=\"150px\">First Name</td>\r\n <td width=\"150px\">\r\n " + Line 134: " <input type=\"text\" name=\"FName\" value=\"\" />\r\n </td>\r\n <td width=\"150" + Line 135: "px\">Date of Visit</td>\r\n <td width=\"150px\"> <input type=\"text\" name=\"DateVisi" + Line 136: "t\" value=\"\" /></td>\r\n <td width=\"150px\">Transaction Date</td>\r\n <td width=" + Line 137: "\"150px\"><input type=\"text\" name=\"TDate\" value=\"\" /></td>\r\n </tr>\r\n <tr>\r\n <" + Line 138: "td width=\"150px\">Middle Name</td>\r\n <td width=\"150px\"><input type=\"text\" name" + Line 139: "=\"MName\" value=\"\" /></td>\r\n <td width=\"150px\">Hearing Aid Benefit</td>\r\n <" + Line 140: "td width=\"150px\"><input type=\"text\" name=\"HABenefit\" value=\"\" /></td>\r\n <td w" + Line 141: "idth=\"150px\">Gross Sale</td>\r\n <td width=\"150px\"><input type=\"text\" name=\"Gro" + Line 142: "ssSale\" value=\"\" /></td>\r\n </tr>\r\n <tr>\r\n <td width=\"150px\">Last Name</td>\r" + Line 143: "\n <td width=\"150px\"><input type=\"text\" name=\"LName\" value=\"\" /></td>\r\n <td" + Line 144: " width=\"150px\">Benefit By Whom</td>\r\n <td width=\"150px\"> <input type=\"text\" n" + Line 145: "ame=\"HABenWhom\" value=\"\" /></td>\r\n <td width=\"150px\">COGS</td>\r\n <td width" + Line 146: "=\"150px\"><input type=\"text\" name=\"COGS\" value=\"\" /></td>\r\n </tr>\r\n <tr>\r\n <" + Line 147: "td width=\"150px\">Referred By</td>\r\n <td width=\"150px\"><input type=\"text\" name" + Line 148: "=\"RefBy\" value=\"\" /></td>\r\n <td width=\"150px\">Insurer</td>\r\n <td width=\"15" + Line 149: "0px\"><input type=\"text\" name=\"HMO\" value=\"\" /></td>\r\n <td width=\"150px\">Brand" + Line 150: "</td>\r\n <td width=\"150px\"><input type=\"text\" name=\"Brand\" value=\"\" /></td>\r\n " + Line 151: " </tr>\r\n <tr>\r\n <td width=\"150px\">Birth Date</td>\r\n <td width=\"150px\"><in" + Line 152: "put type=\"text\" name=\"BDate\" value=\"\" /></td>\r\n <td width=\"150px\">IPA</td>\r\n " + Line 153: " <td width=\"150px\"><input type=\"text\" name=\"IPA\" value=\"\" /></td>\r\n <td wid" + Line 154: "th=\"150px\">Model</td>\r\n <td width=\"150px\"><input type=\"text\" name=\"Model\" val" + Line 155: "ue=\"\" /></td>\r\n </tr>\r\n <tr>\r\n <td width=\"150px\">Gender</td>\r\n <td width" + Line 156: "=\"150px\"><input type=\"text\" name=\"Gender\" value=\"\" /></td>\r\n <td width=\"150px" + Line 157: "\">CPT Code</td>\r\n <td width=\"150px\"><input type=\"text\" name=\"CPTCode\" value=\"" + Line 158: "\" /></td>\r\n <td width=\"150px\">Payment Method</td>\r\n <td width=\"150px\"><inp" + Line 159: "ut type=\"text\" name=\"PayMethod\" value=\"\" /></td>\r\n </tr>\r\n <tr>\r\n <td width" + Line 160: "=\"150px\">Street</td>\r\n <td width=\"150px\"><input type=\"text\" name=\"Street\" val" + Line 161: "ue=\"\" /></td>\r\n <td width=\"150px\">ICD9/10 Code</td>\r\n <td width=\"150px\"><i" + Line 162: "nput type=\"text\" name=\"ICD9Code\" value=\"\" /></td>\r\n <td width=\"150px\">Out of " + Line 163: "Pocket</td>\r\n <td width=\"150px\"><input type=\"text\" name=\"PayPocketAmt\" value=" + Line 164: "\"\" /></td>\r\n </tr>\r\n <tr>\r\n <td width=\"150px\">City</td>\r\n <td width=\"150" + Line 165: "px\"><input type=\"text\" name=\"City\" value=\"\" /></td>\r\n <td width=\"150px\"> " + Line 166: ";</td>\r\n <td width=\"150px\"> </td>\r\n <td width=\"150px\">Insurance Porti" + Line 167: "on</td>\r\n <td width=\"150px\"><input type=\"text\" name=\"PayInsAmt\" value=\"\" /></" + Line 168: "td>\r\n </tr>\r\n <tr>\r\n <td width=\"150px\">State</td>\r\n <td width=\"150px\"><i" + Line 169: "nput type=\"text\" name=\"Street\" value=\"\" /></td>\r\n <td width=\"150px\"> </t" + Line 170: "d>\r\n <td width=\"150px\"> </td>\r\n <td width=\"150px\"> </td>\r\n <t" + Line 171: "d width=\"150px\"> </td>\r\n </tr>\r\n <tr>\r\n <td width=\"150px\">Zip</td>\r\n " + Line 172: " <td width=\"150px\"><input type=\"text\" name=\"Zip\" value=\"\" /></td>\r\n <td widt" + Line 173: "h=\"150px\"> </td>\r\n <td width=\"150px\"> </td>\r\n <td width=\"150px\">" + Line 174: " </td>\r\n <td width=\"150px\"> </td>\r\n </tr>\r\n <tr>\r\n <td width=\"" + Line 175: "150px\">Phone1</td>\r\n <td width=\"150px\"><input type=\"text\" name=\"Phone1\" value" + Line 176: "=\"\" /></td>\r\n <td width=\"150px\"> </td>\r\n <td width=\"150px\"> </td" + Line 177: ">\r\n <td width=\"150px\"> </td>\r\n <td width=\"150px\"> </td>\r\n </tr>" + Line 178: "\r\n <tr>\r\n <td width=\"150px\">Phone2</td>\r\n <td width=\"150px\"><input type=\"" + Line 179: "text\" name=\"Phone2\" value=\"\" /></td>\r\n <td width=\"150px\"> </td>\r\n <td" + Line 180: " width=\"150px\"> </td>\r\n <td width=\"150px\"> </td>\r\n <td width=\"15" + Line 181: "0px\"> </td>\r\n </tr>\r\n <tr>\r\n <td width=\"150px\">Email</td>\r\n <td wid" + Line 182: "th=\"150px\"><input type=\"text\" name=\"Email\" value=\"\" /></td>\r\n <td width=\"150p" + Line 183: "x\"> </td>\r\n <td width=\"150px\"> </td>\r\n <td width=\"150px\"> <" + Line 184: "/td>\r\n <td width=\"150px\"> </td>\r\n </tr>\r\n <tr>\r\n <td width=\"150px\">" + Line 185: " </td>\r\n <td width=\"150px\"> </td>\r\n <td width=\"150px\"> </td" + Line 186: ">\r\n <td width=\"150px\"> </td>\r\n <td width=\"150px\"> </td>\r\n <td" + Line 187: " width=\"150px\"> </td>\r\n </tr>\r\n <tr>\r\n <td width=\"150px\"> </td>\r\n" + Line 188: " <td width=\"150px\"> </td>\r\n <td width=\"150px\"> </td>\r\n <td wi" + Line 189: "dth=\"150px\"> </td>\r\n <td width=\"150px\"> </td>\r\n <td width=\"150px" + Line 190: "\"> </td>\r\n </tr>\r\n <tr>\r\n <td width=\"150px\"> </td>\r\n <td width" + Line 191: "=\"150px\"> </td>\r\n <td width=\"150px\"> </td>\r\n <td width=\"150px\">&" + Line 192: "nbsp;</td>\r\n <td width=\"150px\"> </td>\r\n <td width=\"150px\"> </td>" + Line 193: "\r\n </tr>\r\n <tr>\r\n <td width=\"150px\"> </td>\r\n <td width=\"150px\">&nbs" + Line 194: "p;</td>\r\n <td width=\"150px\"> </td>\r\n <td width=\"150px\"> </td>\r\n " + Line 195: " <td width=\"150px\"> </td>\r\n <td width=\"150px\"> </td>\r\n </tr>\r\n " + Line 196: "<tr>\r\n <td width=\"150px\"> </td>\r\n <td width=\"150px\"> </td>\r\n " + Line 197: "<td width=\"150px\"> </td>\r\n <td width=\"150px\"> </td>\r\n <td width=" + Line 198: "\"150px\"> </td>\r\n <td width=\"150px\"> </td>\r\n </tr>\r\n <tr>\r\n <td" + Line 199: " width=\"150px\"> </td>\r\n <td width=\"150px\"> </td>\r\n <td width=\"15" + Line 200: "0px\"> </td>\r\n <td width=\"150px\"> </td>\r\n <td width=\"150px\"> " + Line 201: ";</td>\r\n <td width=\"150px\"> </td>\r\n </tr>\r\n \r\n</table>\r\n </form>\r\n"); Line 202: Line 203: Line 204: } Line 205: } Line 206: } Line 207: |
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Friday, February 25, 2011
ASP.NET - aspx - page for data input and some code - In Progress
<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="false"
CodeFile="Copy of EnterData.aspx.vb" Inherits="_Default" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<h2>
Welcome to All Ear Doctors Hearing Aids
<asp:Button ID="Button1" runat="server" Text="Enter"
style="z-index: 1; left: 550px; top: 134px; position: absolute" />
</h2>
<table width="900" border="1">
<tr>
<td width="300"><h3 align="center">Patient</h3></td>
<td width="300"><h3 align="center">Insurance</h3></td>
<td width="300"><h3 align="center">Financials</h3></td>
</tr>
</table>
<table width="900" border="1">
<tr>
<td width="150px">First Name</td>
<td width="150px">
<asp:TextBox ID="FName" runat="server" Width="150px"></asp:TextBox>
</td>
<td width="150px">Date of Visit</td>
<td width="150px"> <asp:TextBox ID="DateVisit" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px">Transaction Date</td>
<td width="150px"><asp:TextBox ID="TDate" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td width="150px">Middle Name</td>
<td width="150px"><asp:TextBox ID="LName" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px">Hearing Aid Benefit</td>
<td width="150px"><asp:TextBox ID="HABenefit" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px">Gross Sale</td>
<td width="150px"><asp:TextBox ID="GrossSale" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td width="150px">Last Name</td>
<td width="150px"><asp:TextBox ID="RefBy" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px">Benefit By Whom</td>
<td width="150px"> <asp:TextBox ID="HABenWhom" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px">COGS</td>
<td width="150px"><asp:TextBox ID="COGS" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td width="150px">Referred By</td>
<td width="150px"><asp:TextBox ID="Age" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px">Insurer</td>
<td width="150px"> <asp:TextBox ID="HMO" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px">Brand</td>
<td width="150px"><asp:TextBox ID="Brand" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td width="150px">Birth Date</td>
<td width="150px"><asp:TextBox ID="Gender" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px">IPA</td>
<td width="150px"> <asp:TextBox ID="IPA" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px">Model</td>
<td width="150px"><asp:TextBox ID="Model" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td width="150px">Gender</td>
<td width="150px"><asp:TextBox ID="Street" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px">CPT Code</td>
<td width="150px"> <asp:TextBox ID="CPTCode" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px">Payment Method</td>
<td width="150px"><asp:TextBox ID="PayMethod" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td width="150px">Street</td>
<td width="150px"><asp:TextBox ID="City" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px">ICD9/10 Code</td>
<td width="150px"> <asp:TextBox ID="ICD9Code" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px">Out of Pocket</td>
<td width="150px"><asp:TextBox ID="PayPocketAmt" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td width="150px">City</td>
<td width="150px"><asp:TextBox ID="State" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px"></td>
<td width="150px"> </td>
<td width="150px">Insurance Portion</td>
<td width="150px"><asp:TextBox ID="PayInsAmt" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td width="150px">State</td>
<td width="150px"><asp:TextBox ID="Zip" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px">Zip</td>
<td width="150px"><asp:TextBox ID="Phone1" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px">Phone1</td>
<td width="150px"><asp:TextBox ID="Phone2" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px">Phone2</td>
<td width="150px"><asp:TextBox ID="Email" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px">Email</td>
<td width="150px"><asp:TextBox ID="TextBox13" runat="server" Width="150px"></asp:TextBox></td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
<tr>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
<td width="150px"> </td>
</tr>
</table>
</asp:Content>
Window - Dialog Box - Always On Top
PowerMenu - Power Menu - Application
It's immensely helpful when programming to look at code you've moved around and are transcribing to an IDE. The program above allows computer users & programmers to place a window on top of others.
It's immensely helpful when programming to look at code you've moved around and are transcribing to an IDE. The program above allows computer users & programmers to place a window on top of others.
D-Link Wireless Access Point DAP-2553 Setup Interface - Configuration - BEFORE YOU PROCEED, I SUGGEST YOU BUY A DIFFERENT BRAND - Many productive work hours have been lost due to this faulty access point
If using a Windows machine:
1. Open Control Panel
2. Open Network and Sharing Center
3. Click ''Change adapter settings."
4. Double click on "Local Area Connection."
You should see this (picture below):
5. Highlight "Internet Protocol Version 4 (TPC/IPv4)" & Click properties
6. Enter the values below:
7. Connect your D-Link Wireless Access Point to your PC with an Ethernet cable
8. Open up a web browser and type this into the URL address line: http://192.168.0.50
9. At the login page use these credentials: User Name: admin
*Note: the default password is blank and the default user name is admin.
10. Once you're logged into the access point, you can configure your device.
Note: I posted this because there appeared to be a problem configuring the access point following the instructions provided. I was unable to connect to the login portal following the instructions provided.
If you want to secure your access point, you have to login to the portal/interface and set an encryption password/network password.
Thursday, February 24, 2011
Wednesday, February 23, 2011
SQL Constraints - Primary Key, Foreign Key, Linking Tables
CREATE TABLE Patients
(
PatientID IDENTITY(1,1) PRIMARY KEY CLUSTERED,
FName Char(25),
MName Char(25),
LName Char(25),
RefBy Char(75),
Age date,
Gender Char(2),
Street Char(100),
City Char(75),
State Char(2),
Zip Char(5),
Phone1 char(20),
Phone2 char(20),
Email char(20)
)
-------------------------------------------------------------------------------------------------------
CREATE TABLE Referrals
(
ReferralID smallint IDENTITY(1,1) PRIMARY KEY CLUSTERED,
PatientID smallint NOT NULL,
RefBy Char(35),
DateVisit date,
HABenefit smallint,
BenefitYN Char(2),
HABenWhom Char(35),
IPA Char(25),
HMO Char(75),
CPTCode Char(25),
ICD9Code Char(25)
CONSTRAINT fk_patientID
FOREIGN KEY (PatientID)
REFERENCES Patients(PatientID)
);
------------------------------------------------------------------------------------------------------
CREATE TABLE financials
(TransactionID smallint IDENTITY(1,1) PRIMARY KEY CLUSTERED,
PatientID smallint NOT NULL,
GrossSale money NOT NULL,
COGS money NOT NULL,
TDate date NOT NULL,
Brand char(25),
Model char(50),
PayMethod char(25),
PayPocketAmt money,
PayInsAmt money,
CONSTRAINT fk_patient
FOREIGN KEY (PatientID)
REFERENCES Patients(PatientID)
);
(
PatientID IDENTITY(1,1) PRIMARY KEY CLUSTERED,
FName Char(25),
MName Char(25),
LName Char(25),
RefBy Char(75),
Age date,
Gender Char(2),
Street Char(100),
City Char(75),
State Char(2),
Zip Char(5),
Phone1 char(20),
Phone2 char(20),
Email char(20)
)
-------------------------------------------------------------------------------------------------------
CREATE TABLE Referrals
(
ReferralID smallint IDENTITY(1,1) PRIMARY KEY CLUSTERED,
PatientID smallint NOT NULL,
RefBy Char(35),
DateVisit date,
HABenefit smallint,
BenefitYN Char(2),
HABenWhom Char(35),
IPA Char(25),
HMO Char(75),
CPTCode Char(25),
ICD9Code Char(25)
CONSTRAINT fk_patientID
FOREIGN KEY (PatientID)
REFERENCES Patients(PatientID)
);
------------------------------------------------------------------------------------------------------
CREATE TABLE financials
(TransactionID smallint IDENTITY(1,1) PRIMARY KEY CLUSTERED,
PatientID smallint NOT NULL,
GrossSale money NOT NULL,
COGS money NOT NULL,
TDate date NOT NULL,
Brand char(25),
Model char(50),
PayMethod char(25),
PayPocketAmt money,
PayInsAmt money,
CONSTRAINT fk_patient
FOREIGN KEY (PatientID)
REFERENCES Patients(PatientID)
);
Friday, February 18, 2011
C++ Windows Form Application Initialization - Exercise To Build a Class Template (see bottom)
#pragma once
namespace HelpMeGod {
#include "ObjCell.h"
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Summary for Form1
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::TextBox^ txtOutput;
protected:
private: System::Windows::Forms::Button^ txtBox1;
private: System::Windows::Forms::TextBox^ txtOutput1;
private: System::Windows::Forms::TextBox^ txtOutput2;
private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
this->txtOutput = (gcnew System::Windows::Forms::TextBox());
this->txtBox1 = (gcnew System::Windows::Forms::Button());
this->txtOutput1 = (gcnew System::Windows::Forms::TextBox());
this->txtOutput2 = (gcnew System::Windows::Forms::TextBox());
this->SuspendLayout();
//
// txtOutput
//
this->txtOutput->Location = System::Drawing::Point(33, 76);
this->txtOutput->Name = L"txtOutput";
this->txtOutput->Size = System::Drawing::Size(97, 20);
this->txtOutput->TabIndex = 0;
//
// txtBox1
//
this->txtBox1->Location = System::Drawing::Point(33, 31);
this->txtBox1->Name = L"txtBox1";
this->txtBox1->Size = System::Drawing::Size(97, 23);
this->txtBox1->TabIndex = 1;
this->txtBox1->Text = L"Show Output";
this->txtBox1->UseVisualStyleBackColor = true;
this->txtBox1->Click += gcnew System::EventHandler(this, &Form1::txtBox1_Click);
//
// txtOutput1
//
this->txtOutput1->Location = System::Drawing::Point(33, 125);
this->txtOutput1->Name = L"txtOutput1";
this->txtOutput1->Size = System::Drawing::Size(97, 20);
this->txtOutput1->TabIndex = 2;
//
// txtOutput2
//
this->txtOutput2->Location = System::Drawing::Point(33, 177);
this->txtOutput2->Name = L"txtOutput2";
this->txtOutput2->Size = System::Drawing::Size(97, 20);
this->txtOutput2->TabIndex = 3;
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(284, 262);
this->Controls->Add(this->txtOutput2);
this->Controls->Add(this->txtOutput1);
this->Controls->Add(this->txtBox1);
this->Controls->Add(this->txtOutput);
this->Name = L"Form1";
this->Text = L"Form1";
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void txtBox1_Click(System::Object^ sender, System::EventArgs^ e) {
HelpMeGod::ObjCell<>ethanInt(5);
txtOutput->Text = Convert::ToString(ethanInt.read());
HelpMeGod::ObjCell<double>ethanDouble(5.75);
txtOutput1->Text = Convert::ToString(ethanDouble.read());
HelpMeGod::ObjCell<bool>ethanBool(true);
txtOutput2->Text = Convert::ToString(ethanBool.read());
}
};
}
namespace HelpMeGod {
#include "ObjCell.h"
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Summary for Form1
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::TextBox^ txtOutput;
protected:
private: System::Windows::Forms::Button^ txtBox1;
private: System::Windows::Forms::TextBox^ txtOutput1;
private: System::Windows::Forms::TextBox^ txtOutput2;
private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
this->txtOutput = (gcnew System::Windows::Forms::TextBox());
this->txtBox1 = (gcnew System::Windows::Forms::Button());
this->txtOutput1 = (gcnew System::Windows::Forms::TextBox());
this->txtOutput2 = (gcnew System::Windows::Forms::TextBox());
this->SuspendLayout();
//
// txtOutput
//
this->txtOutput->Location = System::Drawing::Point(33, 76);
this->txtOutput->Name = L"txtOutput";
this->txtOutput->Size = System::Drawing::Size(97, 20);
this->txtOutput->TabIndex = 0;
//
// txtBox1
//
this->txtBox1->Location = System::Drawing::Point(33, 31);
this->txtBox1->Name = L"txtBox1";
this->txtBox1->Size = System::Drawing::Size(97, 23);
this->txtBox1->TabIndex = 1;
this->txtBox1->Text = L"Show Output";
this->txtBox1->UseVisualStyleBackColor = true;
this->txtBox1->Click += gcnew System::EventHandler(this, &Form1::txtBox1_Click);
//
// txtOutput1
//
this->txtOutput1->Location = System::Drawing::Point(33, 125);
this->txtOutput1->Name = L"txtOutput1";
this->txtOutput1->Size = System::Drawing::Size(97, 20);
this->txtOutput1->TabIndex = 2;
//
// txtOutput2
//
this->txtOutput2->Location = System::Drawing::Point(33, 177);
this->txtOutput2->Name = L"txtOutput2";
this->txtOutput2->Size = System::Drawing::Size(97, 20);
this->txtOutput2->TabIndex = 3;
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(284, 262);
this->Controls->Add(this->txtOutput2);
this->Controls->Add(this->txtOutput1);
this->Controls->Add(this->txtBox1);
this->Controls->Add(this->txtOutput);
this->Name = L"Form1";
this->Text = L"Form1";
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void txtBox1_Click(System::Object^ sender, System::EventArgs^ e) {
HelpMeGod::ObjCell<>ethanInt(5);
txtOutput->Text = Convert::ToString(ethanInt.read());
HelpMeGod::ObjCell<double>ethanDouble(5.75);
txtOutput1->Text = Convert::ToString(ethanDouble.read());
HelpMeGod::ObjCell<bool>ethanBool(true);
txtOutput2->Text = Convert::ToString(ethanBool.read());
}
};
}
Thursday, February 17, 2011
Microsoft SQL Server - SQL Database - Trade Allocation by Investor - SQL Query With Inner Join
SELECT Investors.InvestorID, AllocationID, FName, LName, Street, City, State, Zip, AreaCode, Phone
FROM dbo.Investors INNER JOIN dbo.Trades
ON dbo.Investors.InvestorID = dbo.Trades.InvestorID
Microsoft SQL Server - SQL Database - Trade Allocation by Investor - SQL Query With Inner Join
Subscribe to:
Posts (Atom)