15,881,882 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 Sambit_Sahoo (Top 9 by date)
Sambit_Sahoo
10-Dec-19 6:03am
View
Can any body please look into this issue
Sambit_Sahoo
9-Dec-19 13:44pm
View
Yes ..I have tried and I am suspecting like in the below line
$scope.ProcessFileName = orderDetails.itemDetails.productFullName + ".pdf";
because when I am changing the above line to like below
$scope.ProcessFileName = orderDetails.itemDetails.productFullName + ".docx"; then it is downloading the docx file.
So please help me to write a condition to check the file type before downloading.If any additional info you want suggest it is highly appriciated.
Sambit_Sahoo
7-Mar-17 9:48am
View
OleDbConnection Excel_OLE_Con = new OleDbConnection();
OleDbCommand Excel_OLE_Cmd = new OleDbCommand();
//Construct ConnectionString for Excel
string connstring = "Provider=Microsoft.ACE.OLEDB.12.0;" + "Data Source=" + FolderPath + ExcelFileName
+ ";" + "Extended Properties=\"Excel 16.0 Xml;HDR=YES;\"";
//drop Excel file if exists
File.Delete(FolderPath + "\\" + ExcelFileName + ".xlsx");
Sambit_Sahoo
8-Mar-16 1:37am
View
Thanks
Sambit_Sahoo
8-Mar-16 1:22am
View
I am a beginner
Sambit_Sahoo
23-Jul-15 6:23am
View
Below is the Stored Procedure
CREATE PROC [dbo].[Reporting_TrainingHistory](
@CompanyIds varchar(500),
@RequestingContactId INT,
@GroupIds varchar(max) = NULL,
@ContactIds varchar(max) = NULL,
@AllEmployees BIT = 0,
@FromDate datetime = NULL,
@ToDate datetime = NULL ,
@Passed bit = 0 ,
@Failed bit = 0,
@Disabled bit = 0,--@ShowInactiveDocuments
@ShowInactiveContacts BIT = 0,
@IncludeGroupsInResultSet BIT = 0,
@TestStatusFilter VARCHAR(MAX) = NULL,
@LastTestStatusFilter VARCHAR(MAX) = NULL,
@SortOrder1 VARCHAR(MAX) = 'CompanyDescriptor',
@SortOrder2 VARCHAR(MAX) = 'ContactDecriptor',
@SortOrder3 VARCHAR(MAX) = 'DocumentDescriptor',
@SortOrder4 VARCHAR(MAX) = 'TestingDateDesc',
@DocumentIds VARCHAR(MAX) = null
) AS SET NOCOUNT ON
DECLARE @CDP TABLE (
ContactID INT
,DocumentID INT
,DocumentAssignedDate DATETIME
,[Type] VARCHAR(12)
,NextTestDate DATETIME
,LastTestDate DATETIME
,DeliveryDate DATETIME
,TestFrequency INT
,LastContactDocumentTestAttemptID INT
,HasTest BIT
,Active BIT
,ContactDocumentTestAttemptStatusId INT
)
IF @AllEmployees = 1 --use create a group of lists for the companies
BEGIN
SET @GroupIds = NULL
SELECT @GroupIds = COALESCE(@GroupIds+',','') + LTRIM(GroupId)
FROM [Group] g
JOIN fnSplit(@CompanyIds,',') l ON g.CompanyId = l.item
END
IF @ContactIds IS NULL OR @ContactIds = ''
BEGIN
SET @ContactIds = NULL
SELECT @ContactIds = COALESCE(@ContactIds+',','') + LTRIM(ContactId)
FROM [Contact] g
JOIN fnSplit(@CompanyIds,',') l ON g.CompanyId = l.item
END
--filter the contact ids if the requesting contact isn't an admin but is a hierarchial user manager
IF (SELECT .dbo.fnContact_IsHiearchialManager(@RequestingContactId)) = 1 AND (SELECT .dbo.fnContact_IsAdmin(@RequestingContactId)) = 0
BEGIN
DECLARE @tempContactIds VARCHAR(MAX)
SELECT @tempContactIds = COALESCE(@tempContactIds+',','') + LTRIM(s.ContactId)
FROM .dbo.fnContact_Subordinates(@RequestingContactId) s
JOIN .dbo.fnSplit(@ContactIds, ',') s1 ON s1.item = s.ContactId
SET @ContactIds = @tempContactIds
END
INSERT INTO @CDP
SELECT cdp.*
FROM ContactDocumentPermissions cdp
JOIN (SELECT ContactId = item FROM .dbo.fnSplit(@ContactIds, ',')) ids ON cdp.ContactId = ids.ContactId
WHERE HasTest = 1
SELECT DISTINCT
c.ContactId
,ContactDecriptor = c._Descriptor
,ContactActive = c.Active
,d.DocumentId
,DocumentDescriptor = d._Descriptor
,DocumentActive = d.Active
,d.MinPassingPercent
,d.PastDue
,com.CompanyId
,CompanyDescriptor = com._Descriptor
,CompanyActive = com.Active
,GroupId = CASE @IncludeGroupsInResultSet
WHEN 1 THEN cg.GroupId
ELSE NULL END
,GroupDescriptor = CASE @IncludeGroupsInResultSet
WHEN 1 THEN gda._Descriptor
ELSE NULL END
,ReportDate = cdta._EditDate
,LastTestStatus = .dbo.fn_TestStatus(cdta.ContactDocumentTestAttemptStatusId,FinalScore,PastDue,LastContactDocumentTestAttemptId,NextTestDate,MinPassingPercent)
--Cimmented by ASHISH MOTGHARE
--,ReportStatus = .dbo.fn_ReportStatus(NbrOfDeliveryDelayDays,DocumentAssignedDate,cdta.ContactDocumentTestAttemptStatusId,LastTestDate,NextTestDate,PastDue,d.HasTest,ShowOnCurriculum)
,ReportStatus = CASE
WHEN 0 = 1
THEN 'Cur
Sambit_Sahoo
23-Jul-15 5:54am
View
Yes bro,thanks a lot
Sambit_Sahoo
23-Jul-15 5:54am
View
Yes bro,thanks a lot
Sambit_Sahoo
9-Jun-15 2:15am
View
Documentid = DocumentIds.Substring(0, DocumentIds.LastIndexOf(','));
Show More