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