16,004,678 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 12962872 (Top 10 by date)
Member 12962872
25-Jan-17 5:10am
View
I AM GETTING PROBLEM WHILE HOSTING IN IIS
KINDLY HELP ME
Member 12962872
25-Jan-17 3:56am
View
actually i am using nancy framework...
how to host this nancy application in iis
Member 12962872
25-Jan-17 2:06am
View
i think the no.of columns in tbl_insert table is more than 3
if yes ,pls declare the columns name in the insert query
Member 12962872
25-Jan-17 1:44am
View
right click the textbox go to properties select the date format as per the requirement...
Member 12962872
25-Jan-17 1:17am
View
how to host this nancy application in iis and deploy it in client end
kindly help me ....
Member 12962872
25-Jan-17 1:15am
View
Deleted
Member 12962872
25-Jan-17 1:14am
View
<globalization culture="en-NZ" uiCulture="en-NZ" />
<appsettings>
<!--<add key="ConnectionString" value="Data Source=vikasaserver;Initial Catalog=vikasa_school;Integrated Security=false;user id=sa;password=vikasa@321*;Integrated Security=false;"/>-->
<add key="ssd" value="Data Source=SERVER;Initial Catalog=VIKASA;Integrated Security=false;user id=sa;password=vts@123;Integrated Security=false;" />
<add key="ConnectionString" value="Data Source=SERVER;Initial Catalog=VIKASA;Integrated Security=false;user id=sa;password=vts@123;Integrated Security=false;" />
<add key="ChartImageHandler" value="storage=file;timeout=20000;dir=c:\TempImageFiles\;" />
<system.webserver>
<handlers>
<!--add name="Nancy" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*"/-->
<remove name="ChartImageHandler" />
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
<modules runAllManagedModulesForAllRequests="true" />
<validation validateIntegratedModeConfiguration="false" />
<httpErrors existingResponse="PassThrough" />
Member 12962872
25-Jan-17 1:14am
View
my webconf file is....
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configsections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentassembly>
<assemblyIdentity name="Microsoft.ReportViewer.WebForms" publicKeyToken="b03f5f7f11d50a3a" />
<bindingRedirect oldVersion="10.0.0.0" newVersion="10.0.0.0" />
<connectionstrings>
<add name="RismConnectionString" connectionString="Data Source=SERVER;Initial Catalog=VIKASA;Integrated Security=false;user id=sa;password=vts@123;" providerName="System.Data.SqlClient" />
<add name="ssd" connectionString="Data Source=SERVER;Initial Catalog=VIKASA;Integrated Security=false;user id=sa;password=vts@123;Integrated Security=false;" providerName="System.data.sqlclient" />
<add name="Excel03ConString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties='Excel 8.0;HDR={1}'" />
<add name="Excel07ConString" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 8.0;HDR={1}'" />
<system.web>
<httpRuntime requestPathInvalidCharacters="<,>,%,&,:,\,?" />
<pages controlRenderingCompatibilityVersion="4.0" enableSessionState="true">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<customErrors mode="Off" />
<xhtmlConformance mode="Transitional" />
<httphandlers>
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" validate="false" />
<!--add verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*"/-->
<compilation debug="true" targetFramework="4.0">
<assemblies>
<!--1.0.103.0 (3.14.2-->
<!-- <add assembly="System.Data.SQLite,Version=1.0.103.0, Culture=neutral,PublicKeyToken=db937bc2d44ff139"/>-->
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<globalization culture="en-NZ" uiCulture="en-NZ" />
<appsettings>
<!--&l
Member 12962872
25-Jan-17 1:13am
View
attvalue11 = value.Split(',');
}
if (key == "attenalldate")
{
dateee = value.ToString();
}
// //for classid
if (key == "Studatsavclassid")
{
clasid11 = value.ToString();
}
// //for secid
if (key == "Studatsavsectid")
{
secid11 = value.ToString();
}
if (secid11 != "" && clasid11 != "" && dateee != "" && attvalue11.Length != '0' && amstid11.Length != '0' && sat!="")
{
for (int kk1 = 0; kk1 < amstid11.Length; kk1++)
{
string ayst_idget1 = "select aycl_id from adm_y_student where amst_id='" + amstid11[kk1] + "' and aycl_id in(select aycl_id from adm_y_class where acm_id in(select acm_id from adm_cat_module where amay_id='" + yearid11 + "' and am_id=3))";
SqlCommand cmd_ayst1 = new SqlCommand(ayst_idget1, con);
SqlDataAdapter da_ayst1 = new SqlDataAdapter(cmd_ayst1);
DataTable dt_Ayst1 = new DataTable();
da_ayst1.Fill(dt_Ayst1);
if (dt_Ayst1.Rows.Count > 0)
{
ayclid = Convert.ToInt64(dt_Ayst1.Rows[0]["aycl_id"].ToString());
}
attvalue12 = attvalue11[kk1];
int att1 = 0;
if (attvalue12 == "A")
{
att1 = 0;
}
else
{
att1 = 1;
}
string str_attendance1 = "insert into adm_t_attendance(AMST_Id,aycl_id,ATAT_Atten_Type,ATAT_Start_date,ATAT_End_Date,ATAT_Entry_Date,ATAT_Class_Held,ATAT_Class_Atten,ATAT_User_Id,ATAT_User_Time,ATAT_Entry_Type) values ('" + amstid11[kk1] + "','" + ayclid + "', 'D',convert(datetime,'" + dateee + "',103),convert(datetime,'" + dateee + "',103),getdate(),'1','" + attvalue12 + "','" + alu + "',getdate(),'A') ";
DatabaseCommand cmd1 = DbHelper.Command(str_attendance1, CommandType.Text);
i = (cmd1.ExecuteNonQuery());
}
if (i > 0)
{
// //string sss = "{\"Status\":\"Data Saved Successfully\"}";
// //Console.Write(sss);
dateee = ""; secid11 = ""; clasid11 = "";
}
else
{
string sss = "{\"Status\":\"enter the proper details\"}";
Console.Write(sss);
// // Console.ReadKey();
}
Member 12962872
25-Jan-17 1:11am
View
using Nancy;
using Nancy.Hosting.Self;
using Nancy.Responses;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Nancy.ModelBinding;
using System.Collections;
using System.Data;
using System.Text;
using System.Linq.Expressions;
using System.Data.SqlClient;
using System.Configuration;
using System.Drawing;
using DAL;
namespace stdatt
{
public class STUDENTATTENDANCE : Nancy.NancyModule
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ssd"].ConnectionString);
int i;
public STUDENTATTENDANCE()
{
Get["/hello/{name}"] = parameters =>
{
return "Hello " + parameters.name;
};
Post["/category/{id}"] = x =>
{
int alu = x.id;
string myString = string.Empty;
var catergoryModel = this.Bind<receive>();
// // PostService.Save(catergoryModel);
dynamic model = this.Bind<receive>();
// // return Response.AsJson(model);
string a = JsonConvert.SerializeObject(model);
string key = null; string key1 = null;
string value = null;
string value1 = null;
Dictionary<string, object> studentDetails = new Dictionary<string, object>();
var resultObjects = AllChildren(JObject.Parse(a))
.First(c => c.Type == JTokenType.Array && c.Path.Contains("studentAttendance"))
.Children<jobject>();
string yearid1 = "";
long ayclid = 0; string attvalue12 = "";
string attvalue1 = "";string yearid11 = "";
string dateee = "";string dateee11 = "";
string clasid = "";string clasid11 = "";
string secid = "";string secid11 = "";
string[] attvalue = new string[1000];
string[] amstid11 = new string[100];
string[] attvalue11 = new string[100];
string[] amstid1 = new string[100];
string sat ="";
foreach (JObject result in resultObjects)
{
foreach (JProperty property in result.Properties())
{
// // do something with the property belonging to result
key1 = property.Name.ToString();
value1 = property.Value.ToString();
key = property.Name.ToString();
value = property.Value.ToString();
if (key == "id")
{
sat = value;
}
int abc=Convert.ToInt32(sat);
int xyz;
for (xyz = 1; xyz <= abc; xyz++)
{
if (abc == 1)
{
if (key == "Studatsavyearid")
{
yearid11 = value;
}
if (key == "Studatsavid")
{
amstid11 = value.Split(',');
}
if (key == "enteredatten")
{
attvalue11 = value.Split(',');
}
if (key == "attenalldate")
{
Show More