15,913,722 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 Python 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 Kunal Ved (Top 25 by date)
Kunal Ved
17-Feb-18 3:09am
View
I wish to handle this from client side ...
Kunal Ved
6-Aug-14 5:38am
View
Deleted
CREATE PROCEDURE [dbo].[USP_GET_ADMISSION_SUMMARY_REPORT]
(
@DATE_FROM DATETIME,
@DATE_TO DATETIME,
@CENTRE_ID INT=-1
)
AS BEGIN
SELECT CENTRE_NAME, [TOTAL SAIG],[TOTAL BCA],[TOTAL SAIG BCA],[TOTAL REGULAR],[TOTAL ADMISSIONS],[SAIG BILLING],[BCA BILLING],[SAIG BCA BILLING], [REGULAR BILLING], [TOTAL BILLING],[SAIG COLLECTION],[BCA COLLECTION],[SAIG BCA COLLECTION],[REGULAR COLLECTI
ON],[TOTAL COLLECTION]
FROM
(
SELECT
ADMISSION_MASTER.CENTRE_ID,
COUNT(*) AS TOTAL_ADMISSIONS,
COURSE=CASE
WHEN COURSE_TAKEN LIKE '%SAIG%' AND COURSE_TAKEN NOT LIKE '%BCA%' THEN 'TOTAL SAIG'
WHEN COURSE_TAKEN LIKE '%BCA%' AND COURSE_TAKEN NOT LIKE '%SAIG%' THEN 'TOTAL BCA'
WHEN COURSE_TAKEN LIKE '%SAIG%BCA%' THEN 'TOTAL SAIG BCA'
ELSE 'TOTAL REGULAR'
END
FROM
ADMISSION_MASTER
WHERE (ADMISSION_MASTER.ADMISSION_DATE BETWEEN @DATE_FROM AND @DATE_TO)
AND (ADMISSION_MASTER.CENTRE_ID=@CENTRE_ID OR @CENTRE_ID=-1)
GROUP BY CENTRE_ID, COURSE_TAKEN
UNION ALL
SELECT
ADMISSION_MASTER.CENTRE_ID,
COUNT(*) AS TOTAL_ADMISSIONS,
COURSE='TOTAL ADMISSIONS'
FROM
ADMISSION_MASTER
WHERE (ADMISSION_MASTER.ADMISSION_DATE BETWEEN @DATE_FROM AND @DATE_TO)
AND (ADMISSION_MASTER.CENTRE_ID=@CENTRE_ID OR @CENTRE_ID=-1)
GROUP BY CENTRE_ID, COURSE_TAKEN
UNION ALL
SELECT
ADMISSION_MASTER.CENTRE_ID,
SUM(TOTALFEES),
COURSE=CASE
WHEN COURSE_TAKEN LIKE '%SAIG%' AND (COURSE_TAKEN NOT LIKE '%BCA%') THEN 'SAIG BILLING'
WHEN COURSE_TAKEN LIKE '%BCA%' AND (COURSE_TAKEN NOT LIKE '%SAIG%') THEN 'BCA BILLING'
WHEN COURSE_TAKEN LIKE '%SAIG%BCA%' THEN 'SAIG BCA BILLING'
ELSE 'REGULAR BILLING'
END
FROM
ADMISSION_MASTER
WHERE (ADMISSION_MASTER.ADMISSION_DATE BETWEEN @DATE_FROM AND @DATE_TO)
AND (ADMISSION_MASTER.CENTRE_ID=@CENTRE_ID OR @CENTRE_ID=-1)
GROUP BY CENTRE_ID, COURSE_TAKEN
UNION ALL
SELECT
ADMISSION_MASTER.CENTRE_ID,
SUM(TOTALFEES),
COURSE='TOTAL BILLING'
FROM
ADMISSION_MASTER
WHERE (ADMISSION_MASTER.ADMISSION_DATE BETWEEN @DATE_FROM AND @DATE_TO)
AND (ADMISSION_MASTER.CENTRE_ID=@CENTRE_ID OR @CENTRE_ID=-1)
GROUP BY CENTRE_ID
UNION ALL
SELECT
ADMISSION_RECEIPTS.CENTRE_ID,
SUM(ADMISSION_RECEIPTS.AMOUNT_PAID_FEES) AS COLLECTION,
COURSE=CASE
WHEN COURSE_TAKEN LIKE '%SAIG%' AND COURSE_TAKEN NOT LIKE '%BCA%' THEN 'SAIG COLLECTION'
WHEN COURSE_TAKEN LIKE '%BCA%' AND COURSE_TAKEN NOT LIKE '%SAIG%' THEN 'BCA COLLECTION'
WHEN COURSE_TAKEN LIKE '%SAIG BCA%' THEN 'SAIG BCA COLLECTION'
ELSE 'REGULAR COLLECTION'
END
FROM
ADMISSION_RECEIPTS INNER JOIN ADMISSION_MASTER
ON ADMISSION_RECEIPTS.ADMISSION_ID = ADMISSION_MASTER.ADMISSION_ID
WHERE
(ADMISSION_RECEIPTS.PAYMENT_DATE BETWEEN @DATE_FROM AND @DATE_TO)
AND (ADMISSION_RECEIPTS.CENTRE_ID=@CENTRE_ID OR @CENTRE_ID=-1)
GROUP BY
ADMISSION_RECEIPTS.CENTRE_ID, COURSE_TAKEN
UNION ALL
SELECT
ADMISSION_RECEIPTS.CENTRE_ID,
SUM(ADMISSION_RECEIPTS.AMOUNT_PAID_FEES) AS COLLECTION,
COURSE='TOTAL COLLECTION'
FROM
ADMISSION_RECEIPTS INNER JOIN ADMISSION_MASTER
ON ADMISSION_RECEIPTS.ADMISSION_ID = ADMISSION_MASTER.ADMISSION_ID
WHERE
(ADMISSION_RECEIPTS.PAYMENT_DATE BETWEEN @DATE_FROM AND @DATE_TO)
AND (ADMISSION_RECEIPTS.CENTRE_ID=@CENTRE_ID OR @CENTRE_ID=-1)
GROUP BY
ADMISSION_RECEIPTS.CENTRE_ID
) AS SOURCE
PIVOT
(
SUM(TOTAL_ADMISSIONS) FOR COURSE IN ([TOTAL REGULAR],[TOTAL SAIG],[TOTAL BCA],[TOTAL SAIG BCA],[TOTAL ADMISSIONS],[SAIG BILLING],[BCA BILLING],[SAIG BCA BILLING],[REGULAR BILLING],[TOTAL BILLING],[SAIG COLLECTION],[BCA COLLECTION],[SAIG BCA COLLECTION],[R
EGULAR COLLECTION],[TOTAL COLLECTION]
)
) AS PVT
RIGHT OUTER JOIN CENTRE_MASTER
ON CENTRE_MASTER.CENTRE_ID=PVT.CENTRE_ID
WHERE
CENTRE_MASTER.CENTRE_NAME NOT LIKE '%TEST%'
AND CENTRE_MASTER.ISACTIVE=1
AND (C
Kunal Ved
6-Aug-14 3:46am
View
It is a stored Procedure,yes I have. I want to impose an Index on the column
Kunal Ved
30-May-14 8:10am
View
I feel fortunate, 2 techies corresponding via my question ,
I got my solution anyways ;)
Kunal Ved
24-May-14 7:04am
View
Intitially the statement was
string TestDate = Convert.ToDateTime(ds.Tables[0].Rows[0].ItemArray[5].ToString()).ToString("dd/MM/yyyy")
as it would work for only one row and get me a date converted to a string
But now the thing is I am getting multiple datarows as result in dataset , off all the rows I only want that partucular row where the ItemArray["date"] is the earliest date... Please tell me How i can do that.
Kunal Ved
7-May-14 5:59am
View
How ??
I would appreciate, if you could provide any reference.
Kunal Ved
7-May-14 5:19am
View
I am using a datalist control as the notieboard. The datasource of the datalist is a table named "Student_Notice" in the database.
The notices are posted by the admin side and students in their respective account view the notice.
This notice is common for all the students.
What I need is when ever there is a new notice added i.e a new record inserted in the Student_Notice table by the admin ,Whenever the students log in , One should be intimated regarding the new notice being posted via a notification mechanism just like we have in this very Forum.
For e.g I have posted this question in the forum if some one replies to my question , I get a notification , that there is one reply to your question.
Hope it is clear now.
Kunal Ved
14-Apr-14 4:04am
View
Before I joined the team , there was SVN , but according to them for some reason it does not work.
Please suggest me one and how to start with it.
Kunal Ved
2-Dec-13 6:21am
View
I want a database centric log
Kunal Ved
25-Nov-13 3:39am
View
I meant I need to share the uploaded files between two websites within the same serverspace.
Kunal Ved
12-Nov-13 8:02am
View
Well if you think the data organisation is snag , i do not mind changing the structure as well , please suggest me , what would be the ideal way to store a periodical time table
Kunal Ved
12-Nov-13 5:24am
View
Each Teacher (Emloyee) has an assigned Shift Start and End time and their total working hour does not exceed 8.30 Hours.
That Particular's teachers shift timings are fetched from Employee Master Table which is mapped with the TeacherId column of the above diplayed table.
Kunal Ved
16-Sep-13 6:49am
View
I have already add the ajax toolkit dll in the bin folder .
Kunal Ved
29-Aug-13 8:43am
View
I have alert box to display client side validation message box in javascript .. I want to display server side validation messages . I do not wish to put label coz I am using iframe and in that I am calling Asp.net page in that and I do not have enough space to put label in that
Kunal Ved
29-Aug-13 8:13am
View
Can I use Ajax Modal Popup .. does it work if java script is disabled
Kunal Ved
30-Jul-13 6:50am
View
Please Explain with an example . It would be helpful
Kunal Ved
30-Jul-13 6:40am
View
Thnks for your reply can you give an example for the same
Kunal Ved
29-Jul-13 8:11am
View
I added the script Manager proxy too . Still No Success
Kunal Ved
29-Jul-13 8:05am
View
I have already included Script Manager in the Master Page of this Page and I am not missing the dll reference either."<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>" .
I have update panel on the master page , can that cause any problem ? I do not get any sort of error but the update panel keeps on loading
Kunal Ved
29-Jul-13 7:46am
View
Yes .. Its in the master page of this page
Kunal Ved
25-Jul-13 8:46am
View
Got it fixed ..Thanks a lot . Now what about the Session time out ? Can I use HTTP context session than SESSION ? If yes what difference does it make .
Kunal Ved
25-Jul-13 8:28am
View
Session["loggedusername"] = ds.Tables[0].Rows[0].ItemArray[1].ToString();
try
{
Response.Redirect("UploadStudyMaterial.aspx");
}
catch (ThreadAbortException ex)
{
lbMsg.Text = "Some Error " + ex.Message.ToString();
}
i copied your given code , the session variable SESSION["loggedusername"] gets set, the debugger even passes through correct page but it throws ThreadAbortException and again the page is redirected to login page . It never reaches the intended "UploadStudyMaterial.aspx" page after login
Kunal Ved
25-Jul-13 8:05am
View
Thanks for your replies but I have already tried this I get an error "object reference not set to an instance of an object" . Please paraphrase once again what I need to do .
Kunal Ved
25-Jul-13 8:03am
View
Deleted
I already tried this , I got an error "object reference not set to an instance of an object. in asp.net using session"
Kunal Ved
25-Jul-13 7:47am
View
protected void btnLogin_Click(object sender, EventArgs e)
{
try
{
con.Open();
SqlCommand cmd = new SqlCommand("usp_adminlogin_check", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@username", txtUserName.Text);
cmd.Parameters.AddWithValue("@password ", txtPassword.Text);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
con.Close();
if (ds.Tables[0].Rows.Count > 0)
{
Session["loggedusername"] = ds.Tables[0].Rows[0].ItemArray[1].ToString();
try
{
Response.Redirect("UploadStudyMaterial.aspx");
}
catch (ThreadAbortException ex)
{
lbMsg.Text = "Some Error " + ex.Message.ToString();
}
}
else
{
lbMsg.Text = "Invalid User Name or Password, Please try again";
}
}
catch (Exception ex)
{
lbMsg.Text = "Some Error " + ex.Message.ToString();
}
finally
{
con.Close();
}
Show More