15,991,353 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 Santhosh23 (Top 71 by date)
Santhosh23
23-Apr-14 1:30am
View
already is there
Santhosh23
7-Oct-13 3:56am
View
my query is Sum of total hours display in lblHrs. this label belong to item template field so its possible for display total hours in Item template label.
Santhosh23
7-Oct-13 2:58am
View
lblHrs
Santhosh23
3-Oct-13 7:39am
View
yes, but how to access the itemtemplete label in FooterTemplate
Santhosh23
3-Oct-13 7:39am
View
yes, but how to access the itemtemplete label in FooterTemplate
Santhosh23
8-Aug-13 5:37am
View
Hi Bernhard Hiller,
I am modify the code with your syntax
but i got the this type Error Error
iTextSharp.text.pdf.PdfReader': type used in a using statement must be implicitly convertible to 'System.IDisposable'
Santhosh23
2-Jul-13 7:46am
View
hi prabu.. how r u.?
how to get the top 10 records from two tables. order by last-modification desc .
its possible..?
please help me prabhu..
thanks and regards
Santhosh23
12-Jun-13 2:03am
View
check your mail and See above Mode 5 stored procedure
Santhosh23
11-Jun-13 11:19am
View
give me your email id i will send the table script data
Santhosh23
11-Jun-13 9:13am
View
my queries are..
1) First get the Employee Working days between admin approve on days.
2) Second get the total hours for based on above days.
3) detect the hours more than 6 hours.
its possible for single query above requirements.?
Santhosh23
11-Jun-13 8:54am
View
if condition query get 4days. how to use 4days(if condition days). how to repeat the loop and get the total hours in particular day wise (above 4 days)
Santhosh23
11-Jun-13 7:38am
View
i get the 4 days in sub query how to write query for get the total hours per day wise.
how to repeat the loop.
Santhosh23
11-Jun-13 7:24am
View
its my original query..
in mode 5 am get the total working hours admin approved date.
Santhosh23
11-Jun-13 7:22am
View
if(@Mode=5) -- Get Total hours In Particular day with employee and ClientID (Client)
BEGIN
DECLARE @FromDate4 DateTime
DECLARE @RegHrs Int
SET @FromDate1 = @From
WHILE @FromDate1 <= @To
BEGIN
IF((select IsDeduct30minforevery6hours from dbo.tblEmployeeWagesFromClient where EmployeeID=@EmployeeID AND EmployerID=@ClientID)=0)
Begin
SELECT DISTINCT EmployeeName,E.EmployeeID,E.Wage, ClientID, (TotalTime/60) 'TotalHours', (TotalTime%60) 'Minites',((TotalTime/60)*60+(TotalTime%60) ) 'TotalMints',
((TotalTime/60)*60+(TotalTime%60) )'Remaing Mintus',
(Convert(varchar,((E.TotalTime - (30* ROUND(((E.TotalTime/60)/6),2)))/60)))+':'+(convert(varchar,((E.TotalTime - (30* ROUND(((E.TotalTime/60)/6),2)))%60))) 'Display',
(((E.TotalTime/60)*60+(E.TotalTime%60))*((E.Wage)/60)) 'PayPeriod',
CASE WHEN (TotalTime='' or Totaltime=0) THEN
(0)
ELSE (0) END 'Detect Mintus'
FROM (
SELECT DISTINCT Emp.EMPLOYEE_FIRSTNAME+' '+Emp.EMPLOYEE_LASTNAME 'EmployeeName',
CONVERT(decimal,EWC.ForHourRate) 'Wage', ETC.EmployeeID,ClientID,SUM(DATEDIFF(mi,FromTime,ToTime)) 'TotalTime'
FROM tblEmployeeTimeCards ETC INNER jOIN
EMPLOYEE_DETAILS Emp on Emp.EMPLOYEE_ID= ETC.EmployeeID inner join
tblEmployeeWagesFromClient EWC on EWC.EmployeeID=ETC.EmployeeID and EWC.EmployerID=ETC.ClientID
where ETC.EmployeeID=@EmployeeID and ETC.ClientID=@ClientID and
convert(Datetime,convert(char(10),ETC.AdminApporveOn,103),103) between convert(Datetime,convert(char(10),@From,103),103) AND convert(Datetime,convert(char(10),@To,103),103)
and
CONVERT(datetime, CONVERT(VARCHAR(10),etC.AdminApporveOn, 112)) = DATEADD(dd, 0, DATEDIFF(dd, 0,@FromDate1))
and ETC.IsAdminApporve=1 and ETC.AdminApporveOn is not null
GROUP BY ETC.EmployeeID,ETC.clientID,Emp.EMPLOYEE_FIRSTNAME,Emp.EMPLOYEE_LASTNAME,EWC.ForHourRate )E
WHERE E.EmployeeID=@EmployeeID and ClientID=@ClientID
SET @FromDate1 =DATEADD(d,1,@FromDate1)
END
ELSE
BEGIN
SELECT DISTINCT EmployeeName, E.EmployeeID,ClientID,Wage, (TotalTime/60) 'TotalHours', (TotalTime%60) 'Minites',((TotalTime/60)*60+(TotalTime%60) ) 'TotalMints',
CASE WHEN (E.TotalTime/60)>=6 THEN E.TotalTime - (30* ROUND(((E.TotalTime/60)/6),1))
ELSE ((TotalTime/60)*60+(TotalTime%60) ) END 'Remaing Mintus',
CASE WHEN (E.TotalTime/60)>=6 THEN (30* ROUND(((E.TotalTime/60)/6),1))
ELSE 0 END 'Detect Mintus',
CASE WHEN (E.TotalTime/60)>=6 THEN (Convert(varchar,((E.TotalTime - (30* ROUND(((E.TotalTime/60)/6),2)))/60)))+':'+(convert(varchar,((E.TotalTime - (30* ROUND(((E.TotalTime/60)/6),2)))%60)))
ELSE (Convert(varchar,((E.TotalTime - (30* ROUND(((E.TotalTime/60)/6),2)))/60)))+':'+(convert(varchar,((E.TotalTime - (30* ROUND(((E.TotalTime/60)/6),2)))%60))) END 'Display',
CASE WHEN ((E.Wage != 0 Or E.Wage !='') and (E.TotalTime/60)>=6 )
THEN (E.TotalTime - (30* ROUND(((E.TotalTime/60)/6),1)))*((Wage)/60)
ELSE (((E.TotalTime/60)*60+(E.TotalTime%60))*((Wage)/60) ) END 'PayPeriod'
FROM (
SELECT DISTINCT Emp.EMPLOYEE_FIRSTNAME+' '+Emp.EMPLOYEE_LASTNAME 'EmployeeName',
CONVERT(decimal,EWC.ForHourRate) 'Wage', ETC.EmployeeID,ClientID,SUM(DATEDIFF(mi,FromTime,ToTime)) 'TotalTime'
FROM tblEmployeeTimeCards ETC inner join
EMPLOYEE_DETAILS Emp on Emp.EMPLOYEE_ID= ETC.EmployeeID inner join
tblEmployeeWagesFromClient EWC on EWC.EmployeeID=ETC.EmployeeID and EWC.EmployerID=ETC.ClientID
where ETC.EmployeeID=@EmployeeID and ETC.ClientID=@ClientID and
CONVERT(datetime, CONVERT(VARCHAR(10),etC.AdminApporveOn, 112)) = DATEADD(dd, 0, DATEDIFF(dd, 0,@FromDate1))
AND
convert(Datetime,convert(char(10),ETC.AdminApporveOn,103),103) between convert(Datetime,convert(char(10),@From,103),103) AND convert(Datetime,convert(char(10),@To,103),103)
and IsAdminApporve=1 and AdminApporveOn is not null
GROUP BY ETC.EmployeeID,ETC.clientID,Emp.EMPLOYEE_FIRS
Santhosh23
11-Jun-13 7:20am
View
Declare @Days datetime
Begin
if((select Distinct DATEADD(dd, 0, DATEDIFF(dd, 0,SubmittedOn)) as WorkingDate
--SubmittedOn
from dbo.tblEmployeeTimeCards where
EmployeeID=71 and ClientID=20
and convert(Datetime,convert(char,AdminApporveOn,20),20) between
convert(Datetime,convert(char,'6-7-2013 7:00:00',20),20) AND convert(Datetime,convert(char,'6-21-2013 6:59:00',20),20)) is Not null)
Begin
END
END
just am tried in normal way.. please check my query
Santhosh23
11-Jun-13 7:12am
View
yup prabu.. i tried with sub query's. but i got the error like
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Santhosh23
11-Jun-13 6:54am
View
am passing the admin approve date then display the employee working days or request days.
Santhosh23
11-Jun-13 6:46am
View
did you get the question 1.. idea..?
Santhosh23
11-Jun-13 6:46am
View
Deleted
you got the question 1..?
Santhosh23
11-Jun-13 6:45am
View
yup excalty.. prabu...
Santhosh23
11-Jun-13 6:35am
View
ya default value is NULL. when admin approve employee request that time am inserted.
employee send request for admin approval (2013-6-5 & 2013-6-7) but admin approved date is 2013-6-9.
when ever am select the admin approved date ex - 2013-6-9 then shows the working dates. this is question 1
and
2) display the the total working hours day wise. (2013-6-5 working 7hours) (2013-6-5 working 5 hours)
this 2 query example
3)now detect the 30 mints every 6 hours day wise.
Santhosh23
11-Jun-13 5:35am
View
Hi Prabu.. How r u..?
I have Employee Time sheet table in this table Form-time and to-time and Admin-Approve-on three columns are there. you are given good solution for me. same like that
1) Admin approve 10 records at a time based on employee request different dates. how to get the employee working dates when admin approve on date.
2) suppose am get 5 the 5 different days then how to get the time record for each and every day..?
3) how to get the working hours. above 6 hrs work detect the 30 mints.
please prabu give me any suggestions.?
thanks and regards
Santhosh23
28-May-13 9:33am
View
ya i tried declare variables. but not get total some value. another column means. display total some value with in same table.? its possible.?
Santhosh23
28-May-13 7:54am
View
Hi Prabu..
i have small doubt in sql query. am repeat the while loop in my query. same query executes 10 times. each and every time get some value. how to show total some value(all of some values) or how to sum all some values and display as anther column
please give me any ideas.
thanks and regards
Santhosh23
24-May-13 7:32am
View
ok prabu i solved my problem. am not mention single code. this is error in my query
Santhosh23
24-May-13 6:54am
View
hi prabhu how to get the days between two dates
my query like this
select ((DATEDIFF(d,2013-01-25,2013-03-25))) but output shows -2, i given yyyy-mm-dd format
what is error. how to get total days
Santhosh23
24-May-13 5:04am
View
hi prabu..
i want i more query using Case statement using case
above query inner join with anther table then i didn't get any rows. then how to update one table row value. if else after inner join display any rows no need to update query.
how it possible please help me..
thanks and regards
SELECT E.EmployeeID,E.Day, (E.TotalTime/60) 'TotalHours', (E.TotalTime%60) 'Minites',
CASE WHEN (E.TotalTime/60)>=6 THEN E.TotalTime - (30* ROUND((E.TotalTime/60*6),1))
ELSE (E.TotalTime/60) END 'TotalWorkHours'
Santhosh23
21-May-13 6:55am
View
good logic..
nice..
Santhosh23
21-May-13 5:05am
View
hi prabhu..
just am modify single line in your query now its working fine..
CASE WHEN (E.TotalTime/60)>=6 THEN E.TotalTime - (30* ROUND((E.TotalTime/60*6),1))
replace with
CASE WHEN (E.TotalTime/60)>=6 THEN E.TotalTime - (30* ROUND(((E.TotalTime/60)/6),1))
than q so much.. prabu..
i have any doubt in sql server query. i will contact with u..
thanks and regards
Santhosh23
21-May-13 3:06am
View
my second questions is how to detect the hours from TotalHours. i.e
employee working 14hours in single day. so my question is..
after every 6 hours subtract the 30 mints from TotalHours. employee worked on 14hrs in the Day. so Subtract the 60 mints in total hours. how to write the query for subtract detect hours and get the reaming hours..?
please help me prabhu..
thanks
Santhosh23
21-May-13 3:00am
View
hi prabu..
thanks for replay
your query is working fine. thank you so much...
Santhosh23
16-Apr-13 4:31am
View
just now execute your query display record between two dates
Santhosh23
16-Apr-13 3:52am
View
hi Macieij. thanks for your replay.
i have only one record in my table. the record dived into multiple rows based on from-date and to-date differnces
Santhosh23
12-Apr-13 7:07am
View
convert(Datetime,convert(char(10),SubmittedOn,103),103) between convert(Datetime,convert(char(10),@From,103),103) AND convert(Datetime,convert(char(10),@To,103),103)
its working fine
Santhosh23
12-Apr-13 7:06am
View
thanks dude.. its working fine..
Santhosh23
12-Apr-13 7:03am
View
yes.. my colomn datatype is datetime.. but i got the error..
Santhosh23
12-Apr-13 4:57am
View
hi Aarti..
thanks for your replay.
just now execute but i got the error
Msg 242, Level 16, State 3, Procedure USP_GetTimeCardReportForEmployee, Line 254
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
Santhosh23
7-Mar-13 23:44pm
View
Hi Friend.. thank for your replay..
i got the some logical ideas..
thank you so much.. Maciej
Santhosh23
7-Mar-13 10:13am
View
AjaxControlToolkit.dll is available in bin folder
Santhosh23
7-Mar-13 6:01am
View
ya.. AjaxControlToolkit.dll is available in bin folder
Santhosh23
1-Mar-13 1:53am
View
ya, am using Image button in child gridview.
please see my Gridview structure.
<asp:GridView ID="ParentGridview" GridLines="Horizontal" AutoGenerateColumns="false" runat="server"
ShowHeader="false" Width="100%" OnRowDataBound="ParentGridview_RowDataBound" Style="border: none!important;">
<columns>
<asp:TemplateField ShowHeader="false">
<itemtemplate>
<tr>
<td colspan="5" align="left" valign="top">
<asp:GridView ID="ChildGridview1" GridLines="Horizontal" OnRowDataBound="ChildGridview1_RowDataBound"
OnRowCommand="ChildGridview1_RowCommand" ShowHeader="false" AutoGenerateColumns="false"
runat="server" Width="100%" Style="border: none!important;">
<columns>
<asp:TemplateField ShowHeader="false">
<itemtemplate>
<table align="left" width="100%">
<tr>
<td colspan="5" align="left" valign="top">
<asp:GridView ID="ChildGridview2" GridLines="None" Width="100%" ShowHeader="true"
OnRowDataBound="ChildGridview2_RowDataBound" Visible="false" OnRowCommand="ChildGridview2_RowCommand" AutoGenerateColumns="false"
runat="server">
<columns>
<asp:TemplateField ShowHeader="true">
<itemtemplate>
<table width="100%">
<tr>
<td align="left" valign="top" width="1%">
<asp:ImageButton ID="imgEdit" runat="server" ImageUrl="../images/delete-icon.png"
CommandName="" />
<asp:ImageButton ID="imgDelete" runat="server" ImageUrl="../images/gtk-edit.png" />
</td>
<td colspan="5" align="left" valign="top">
<asp:GridView ID="ChildGridview3" GridLines="None" Width="100%" ShowHeader="true"
Santhosh23
28-Feb-13 9:24am
View
your above codeing working fine..
Santhosh23
28-Feb-13 8:31am
View
hi Aarti., Than q for your replay. but in my table Employer 7 having 14 records. how to display all records please help me Aarti..
than q and Regards
Santhosh23
26-Feb-13 7:43am
View
just now update my question please see once..
Santhosh23
15-Feb-13 2:03am
View
Hi Tadit dash,
Thank so much.. your code is working fine..
Santhosh23
7-Feb-13 7:52am
View
hi Vinod,
if($(this).attr("display")==="block") this syntax is correct. actually if condition having only == type format support na..?
Santhosh23
30-Jan-13 10:02am
View
i tried on this format, i got error procedure pass the too many multiple parameters, how to pass the 'value1','value1','value3','value4' this way
Santhosh23
29-Jan-13 11:49am
View
hi Milind,
your query wroking fine.
select SUBSTRING('city,sate,county,nat',0,CHARINDEX(',','city,sate,county,nat',0))
select SUBSTRING('city,sate,county,nat',
(CHARINDEX(',','city,sate,county,nat',0)+1),(lEN('city,sate,county,nat')-(CHARINDEX(',','city,sate,county,nat',0))))
how to write the same query using 4 parameters please help me
Santhosh23
29-Jan-13 10:19am
View
your query working sql statement. same query how to write in stored procedure
am execute procedure
SELECT RECORDID,AVAILABILITY,EMPLOYEMENTSTATUS,CLIENTNAME,DOB,SKILLS,EMAILID,VISA,CREATEDDATE,LOCATION,CITY+', '+C_STATE as LOCATION FROM dbo.RECORDDETAILS where CLIENTNAME in (@CLIENTNAME)
but exec SP_GET_RECORDDETAILS1 'Client Test','IBM','newclient' shows the error too many parameters.
exec SP_GET_RECORDDETAILS1 'Client Test,IBM,newclient'
its show no records
how to write same query in stored procedure.
Santhosh23
29-Jan-13 8:08am
View
thank for your replay,
just now am tring your query
am selection two names in listbox.
SELECT RECORDID,AVAILABILITY,EMPLOYEMENTSTATUS,CLIENTNAME,DOB,SKILLS,EMAILID,VISA,CREATEDDATE,LOCATION,CITY+', '+C_STATE as LOCATION
FROM dbo.RECORDDETAILS where CLIENTNAME='newclient,gdgf'
but no records found my query like this
Santhosh23
29-Jan-13 7:39am
View
thank for the your replay.
actually i don't have client_id field. and am passing the client-names. depend on user selection. so how to split the values by using , in database. actually we don't no for how many selections in client names
Santhosh23
24-Jan-13 4:42am
View
please tel me new approaches..
Santhosh23
23-Jan-13 11:10am
View
Hi thanq for you replay.
my is page is refresh is done, but i lost the text box values, how to maintain the textbox values after refresh the my page
Santhosh23
21-Jan-13 11:40am
View
how to cal mode parameter.
Santhosh23
21-Jan-13 11:34am
View
hi sandeep, this is my query
CREATE PROCEDURE `SP_GETBLOGS`(_MODE INT,_BLOGNAME VARCHAR(100),_DESCRIPTION longtext,_BLOGID INT,_BLOGSUBJECT varchar(100),_ADMINNAME Varchar(1000))
BEGIN
IF(_MODE=1) then
SELECT BLOGID,BLOGNAME, DESCRIPTION,BLOGSUBJECT,POSTEDDATE,ADMINNAME FROM blogpostbyadmin order by BLOGID desc ;
END if;
how write a syntax for my code.
please help me
Santhosh23
10-Jan-13 7:14am
View
hi, what is Envirement.? please provide full code. i cant understand your short code
Santhosh23
10-Jan-13 7:03am
View
hi thanks for your replay, i have doubt for above code. the two lines are used for which time insert into database or retrieve the data from database.
Santhosh23
7-Jan-13 10:58am
View
thanq for replay,
but cant work am tried
Santhosh23
7-Jan-13 10:16am
View
hi,
jquery was not called. and it's show the empty alert box.
please help me
Santhosh23
7-Jan-13 10:12am
View
Hi Frnd,
How to given correct url.. in your ajax method. me also tried in different ways. please send me your code.. or give me your suggestion
thank u
Santhosh23
4-Jan-13 4:28am
View
{"Message":"Cannot convert object of type \u0027System.String\u0027 to type \u0027System.Collections.Generic.IDictionary`2[System.String,System.Object]\u0027","StackTrace":" at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)\r\n at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)\r\n at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)\r\n at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input)\r\n at System.Web.Script.Services.RestHandler.GetRawParamsFromPostRequest(HttpContext context, JavaScriptSerializer serializer)\r\n at System.Web.Script.Services.RestHandler.GetRawParams(WebServiceMethodData methodData, HttpContext context)\r\n at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}
i got the this type errors on my alert. am modifythe my script like below
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$("#btnok").click(function () {
var title = $("#title").val();
var name = $("#name").val();
var city = $("#city").val();
var state = $("#state").val();
var date = $("#date").val();
var duratin = $("#duration").val();
var pay = $("#pay").val();
var type = $("#type").val();
var industry = $("#industry").val();
var status = $("#status").val();
var description = $("#description").val();
var qualification = $("#qualification").val();
// var data = { title: title, Name: name, city: city, state: state, date: date, duration: duratin, pay: pay, industry: industry, type: type, status: status, description: description, qualification: qualification };
var data = { title:$("#title").val(),name: $("#name").val(), city: $("#city").val(), state: $("#state").val(), date: $("#date").val(),duration:$("#duration").val(),pay:$("#pay").val(),type: $("#type").val(),industry:$("#industry").val(),status:$("#status").val(),description:$("#description").val(),qualification: $("#qualification").val() };
var data = JSON.stringify(data);
alert(data);
$.ajax({
type: "POST",
url: "http://localhost:3658/HostingService.asmx/SETPostJobDetails",
data:JSON.stringify(data),//"{'title':" + title + ",'C.Name':" + name + ",'city':" + city + ",'state':" + state + ",'date':" + date + ",'duration':" + duratin + ",'pay':" + pay + ",'industry':" + industry + ",'type':" + type + ",'status':" + status + ",'description':" + description + ",'qualification':" + qualification + "}",
// data: // "{'title':'" + $("#title").val() + "','C.Name':'" + $("#name").val() + "','city':'" + $("#city").val() + "','state':'" + $("#state").val() + "','date':'" + $("#date").val() + "','duration':'" + $("#duration").val() + "','pay':'" + $("#pay").val() + "','industry':'" + $("#industry").val() + "','type':'" + $("#type").val() + "','status':'" + $("#status").val() + "','description':'" + $("#description").val() + "','qualification':'" + $("#qualification").val() + "'}",
contentType: "application/json;charset=utf-8",
processData: false,
dataType: "json",
success: function (data) {
alert('Success');
},
error: function (data, status, error)
Santhosh23
4-Jan-13 2:24am
View
i got the new error in like. this error shows firebug
Error while calling a function using jquery-ajax ("NetworkError: 500 Internal Server Error)
Santhosh23
4-Jan-13 1:58am
View
hi tharaka MTR,
just now am modify the script in On-error function. but it shows the empty alert box only. how to solve my problem please help me.
Santhosh23
3-Jan-13 9:33am
View
ok this is my services code
[WebMethod, ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public string SETPostJobDetails(string Title, string Type, string Description, string Qualification, string Compensation, string openings, string city,
string state, string name, string phone, string email, string date, string zipcode, string job_categories, string client_id)
{
DataSet ds = new DataSet();
try
{
SqlDataAdapter adp = new SqlDataAdapter();
adp.SelectCommand = new SqlCommand();
adp.SelectCommand.CommandType = CommandType.StoredProcedure;
adp.SelectCommand.Connection = (SqlConnection)OpenConnection1();
adp.SelectCommand.CommandText = "SP_POST_JOBDETAILS_SET";
SqlParameter[] Parameters = new SqlParameter[15];
Parameters[0] = new SqlParameter("@JOB_TITLE", SqlDbType.VarChar, 100);
Parameters[0].Value = Title;
Parameters[1] = new SqlParameter("@JOB_TYPE", SqlDbType.VarChar, 50);
Parameters[1].Value = Type;
Parameters[2] = new SqlParameter("@DESCRIPTION", SqlDbType.VarChar, 5000);
Parameters[2].Value = Description;
Parameters[3] = new SqlParameter("@QUALIFICATIONS", SqlDbType.VarChar, 1000);
Parameters[3].Value = Qualification;
Parameters[4] = new SqlParameter("@COMPENSATION_RANGE", SqlDbType.VarChar, 200);
Parameters[4].Value = Compensation;
Parameters[5] = new SqlParameter("@NO_OF_OPENINGS", SqlDbType.VarChar, 50);
Parameters[5].Value = openings;
Parameters[6] = new SqlParameter("@CITY", SqlDbType.VarChar, 200);
Parameters[6].Value = city;
Parameters[7] = new SqlParameter("@STATE", SqlDbType.VarChar, 100);
Parameters[7].Value = state;
Parameters[8] = new SqlParameter("@CONTACT_NAME", SqlDbType.VarChar, 500);
Parameters[8].Value = name;
Parameters[9] = new SqlParameter("@CONTACT_PHONE", SqlDbType.VarChar, 50);
Parameters[9].Value = phone;
Parameters[10] = new SqlParameter("@EMAIL", SqlDbType.VarChar, 100);
Parameters[10].Value = email;
Parameters[11] = new SqlParameter("@START_DATE", SqlDbType.DateTime);
Parameters[11].Value = Convert.ToDateTime(date);
Parameters[12] = new SqlParameter("@ZIPCODE", SqlDbType.VarChar, 20);
Parameters[12].Value = zipcode;
Parameters[13] = new SqlParameter("@JOB_CATEGORIES", SqlDbType.VarChar, 200);
Parameters[13].Value = job_categories;
Parameters[14] = new SqlParameter("@CLIENT_ID", SqlDbType.Int);
Parameters[14].Value = int.Parse(client_id);
adp.SelectCommand.Parameters.AddRange(Parameters);
adp.Fill(ds);
string[][] JaggedArray = new string[ds.Tables[0].Rows.Count][];
//int i = 0;
//Dictionary<object, object> resultMain = new Dictionary<object, object>();
List<object> resultMain = new List<object>();
foreach (DataRow rs in ds.Tables[0].Rows)
{
Dictionary<string, object=""> result = new Dictionary<string, object="">();
foreach (DataColumn dc in ds.Tables[0].Columns)
{
result.Add(dc.ColumnName, rs[dc].ToString());
}
resultMain.Add(result);
//i = i + 1;
}
JavaScriptSerializer js = new JavaScriptSerializer();
string strJSON = js.Serialize(resultMain);
return strJSON;
}
catch
Santhosh23
3-Jan-13 9:08am
View
just now am tired.. but not working and already i added [ScriptService] method in .asmx page..
Santhosh23
3-Jan-13 8:10am
View
Yes, get the OnError alert box, and i dont get the data values and always i got undefined values in alert box. and object xmlhttprequest error.. this is are me facing the problems. please help me.. thank and regards
Santhosh23
31-Dec-12 3:25am
View
am using versions in phpmyadmin Server version: 5.0.77 ,Protocol version: 10,
Server: mysql2.netcarrier.com via TCP/IP
phpMyAdmin - 2.11.8.1,
MySQL client version: 5.0.51a
Used PHP extensions: mysql
any problem for my versions.. please help me
Santhosh23
31-Dec-12 3:10am
View
thanks for your replay..
i am modified the my procedure but i got the error
DELIMITER //
CREATE PROCEDURE `SP_GET_ALLJOBIDS`()
BEGIN
select * from jobdetails ;
END //
DELIMITER ;
Error is:
DELIMITER //
CREATE PROCEDURE `SP_GET_ALLJOBIDS`()
BEGIN
select * from jobdetails ;
END //
SQL query: Documentation
DELIMITER // CREATE PROCEDURE `SP_GET_ALLJOBIDS`() BEGIN select * from jobdetails ; END //
MySQL said: Documentation
#1044 - Access denied for user '***'@'216.178.92.138' to database '****'
Santhosh23
29-Oct-12 7:57am
View
a tried your code i got the this type of error
Nullable object must have a value.
Santhosh23
19-Oct-12 9:04am
View
thanq u so much... its wrking fine
Santhosh23
19-Oct-12 8:44am
View
how to write query for slipt..?
Show More