15,897,187 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 Diya Ayesa (Top 200 by date)
Diya Ayesa
26-Jul-15 3:08am
View
also i give full control to postgreSQL folder . and also when i reinstall in c:\postgresql it said folder is not empty so i install in data folder.. but always same error occured..Problem running post-install setup.Installation may not complete correctly.the database cluster initialization failed
Diya Ayesa
25-Jul-15 9:00am
View
??/
Diya Ayesa
25-Jul-15 4:22am
View
ok i paste log file check please
Diya Ayesa
24-Jul-15 23:33pm
View
ok will you please tell from where i find log file in postgresql folder beacause this is my first postgresql installation so i dont know about this
Diya Ayesa
24-Jul-15 7:09am
View
which info you need?
Diya Ayesa
24-Jul-15 5:00am
View
i also check that link but not helpful
Diya Ayesa
13-Jul-15 4:40am
View
thankx
Diya Ayesa
12-Jul-15 6:55am
View
yes i know about Conditional ("if") statements? Sorting? Console.WriteLine? but loops and arrays little bit
Diya Ayesa
11-Jul-15 9:09am
View
whole code i dont understand :P will you please write comment above on every line of code
Diya Ayesa
11-Jul-15 8:43am
View
thank u so much it works.. but i can not understand the code.. :(
Diya Ayesa
30-Dec-14 6:43am
View
i update the question
Diya Ayesa
29-Dec-14 2:49am
View
i also try this but this not works
Diya Ayesa
16-Oct-14 13:13pm
View
yes i try also make the width in % but the menu look like this.. please check this image
http://oi57.tinypic.com/28018bt.jpg
Diya Ayesa
4-Oct-14 5:02am
View
there is a record exist with username and password and their usertype ID and i am also login from these user name and password...
Diya Ayesa
4-Oct-14 4:34am
View
?????????????????
Diya Ayesa
4-Oct-14 4:05am
View
and there is admin user in database.. and i cannot understand your second point
Diya Ayesa
4-Oct-14 4:04am
View
if query not returning any rows then how public user login and redirect to gallery page... ???
Diya Ayesa
4-Oct-14 3:16am
View
Deleted
oh common ... user type ID is always 1 for admin
Diya Ayesa
30-Sep-14 7:39am
View
this is the code which i try but admin always goes to gallery page where as i want admin must go to reports page and it not works
if ( dr.HasRows )
{
dr.Read( );
Session[ " UName" ] = dr[ 0 ].ToString( );
Session[ " UPasword" ] = dr[ 1 ].ToString( );
Session[ "UserType_ID" ] = dr[ 2 ].ToString( );
//Session["prenom"] = dr[2].ToString();
//Session["telephone"] = dr[3].ToString();
}
// !!!
if(Convert.ToString(Session[ "UserType_ID" ]) == "admin" )
{
Response.Redirect( "View_Reports.aspx" );
}
else
{
Response.Redirect( "gallery.aspx" );
}
Diya Ayesa
30-Sep-14 7:12am
View
and warning error : Warning 20 Possible unintended reference comparison; to get a value comparison, cast the left hand side to type 'string'
on this line if ( Session[ "UserType_ID" ] == "admin" )
Diya Ayesa
30-Sep-14 7:10am
View
THANK your for your reply when i try your code it shows me error :Index was outside the bounds of the array. on this line Session[ " UPasword" ] = dr[ 4 ].ToString( );
Diya Ayesa
4-Jun-14 12:16pm
View
@karthik holla this <ul class="nav"> should be inside the table tag or i write outside table tag
Diya Ayesa
4-Jun-14 11:49am
View
it works
Diya Ayesa
4-Jun-14 11:35am
View
how?
Diya Ayesa
24-Feb-14 8:29am
View
whatever
Diya Ayesa
24-Feb-14 4:12am
View
ok now i try this
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Clear();
LinkButton l1 = (LinkButton)sender;
string filenm = l1.CommandArgument;
string Path = MapPath("~/Docfiles/" + filenm);
byte[] bts = System.IO.File.ReadAllBytes(Path);
Response.Clear();
Response.ClearHeaders();
Response.AddHeader("Content-Type", "Application/octet-stream");
Response.AddHeader("Content-Length", bts.Length.ToString());
Response.AddHeader("Content-Disposition", "attachment; filename=" + filenm);
Response.BinaryWrite(bts);
Response.Flush();
Response.End();
}
but when on file it does not download
Diya Ayesa
21-Feb-14 23:23pm
View
i remove it also.. and thankx for correcting my mistake ..
Diya Ayesa
21-Feb-14 16:35pm
View
ok so please u remove ur comment i also remove my unncessary post
Diya Ayesa
21-Feb-14 16:34pm
View
ok so please u remove my comment i also remove my question
Diya Ayesa
21-Feb-14 15:30pm
View
so why u use " have some shame"
Diya Ayesa
21-Feb-14 14:45pm
View
ok i remove this but first please dont use abusive language and u first remove comment then i remove my questions
Diya Ayesa
21-Feb-14 14:26pm
View
hey why u comment my question as a fake ?
Diya Ayesa
21-Feb-14 14:26pm
View
Deleted
this is not fake . i done this in my project and it works for me
Diya Ayesa
21-Feb-14 12:45pm
View
lolzz ... i am getting ur answer.. and please try to explain others in that way that others understand ur answer.. :p
Diya Ayesa
20-Feb-14 13:04pm
View
Deleted
if(count>0)
{
// Duplicate entries are present
}
else
{
//Insert into data base.
}
}
catch(Exception)
{
}
i cannot understand ..
Diya Ayesa
19-Feb-14 13:03pm
View
how
Diya Ayesa
19-Feb-14 5:26am
View
if and else check i will done in class library or in .aspx.cs application
Diya Ayesa
19-Feb-14 5:25am
View
ok now i try this
ALTER procedure [dbo].[spadminreg]
@UserName nvarchar(50),
@Password nvarchar(50),
@UserTypeID int,
@DepID int,
@DesigID int,
@emailaddress nvarchar(50),
@PhoneNumber nvarchar(50),
@action nvarchar(50)
AS
BEGIN
if(@action='CheckDuplicate')
BEGIN
Select * from Userss where UserTypeID=@UserTypeID AND DepID=@DepID And DesigID=@DesigID;
END
if(@action='Insert')
BEGIN
insert into [Userss](UserName,Password,UserTypeID,DepID,CreateDate,DesigID,Email ,PhoneNumber)
values
(@UserName,@Password,@UserTypeID,@DepID,GETDATE(),@DesigID,@emailaddress,@PhoneNumber)
END
end
GO
and in library class
public void AdminSignUp(string Username, string Password, int UserTypeID, int DepID, int desigid, string emailaddress, string PhoneNumber)
{
try{
db.ExecuteScalar("spadminreg", new object[] { Username, Password, UserTypeID, DepID, desigid, emailaddress, PhoneNumber ,"CheckDuplicate"});
if('Check returned data set rows count'>0)
{
// Duplicate entries are present
}
else
{
//Insert into data base.
}
}
catch(Exception)
{
}
}
Diya Ayesa
19-Feb-14 5:18am
View
:'( i am very confuse with thiss..... what i write instead of CheckDuplicate in c# code...
Diya Ayesa
19-Feb-14 5:11am
View
u say not to change in database.. so what is check duplicate here..
Diya Ayesa
19-Feb-14 5:04am
View
u say not to change in database.. so what is check duplicate here..
Diya Ayesa
19-Feb-14 4:06am
View
i try this...
please correct me if am wrong
string action;
if(action=='CheckDuplicate')
{
string action = adminsignup.Admindes(Convert.ToInt32(DropDownList2.SelectedValue));
adminsignup.AdminSignUp(nametxt.Value, passtxt.Value, Convert.ToInt32(DropDownList1.SelectedValue), Convert.ToInt32(DropDownList2.SelectedValue), Convert.ToInt32(DropDownList3.SelectedValue), mailtxt.Value, numbtxt.Value);
Success.Visible = true;
Success.Text = ("Account Successfully Created");
}
else
{
Info.Visible = true;
Info.Text = (" Desingation already exists");
}
}
catch
{
Error1.Visible = true;
Error1.Text = ("SIGNUP FAILED.PLEASE TRY AGAIN");
}
Diya Ayesa
19-Feb-14 4:00am
View
can u please tell me in code how i done this through code..
Diya Ayesa
19-Feb-14 3:37am
View
what is @action .. if i add action parameter in sp then will i add one more column in table?
Diya Ayesa
18-Feb-14 12:54pm
View
ok :)
Diya Ayesa
18-Feb-14 11:56am
View
so can u please tell me this question is there any solution
Diya Ayesa
18-Feb-14 11:10am
View
oh sorry ... the link u provide and ur answer works for me ...thanku
Diya Ayesa
17-Feb-14 6:43am
View
i try ur code and it shows me same error in catch
Diya Ayesa
17-Feb-14 6:31am
View
in catch line
Diya Ayesa
9-Feb-14 16:15pm
View
i dont understand your point... i want when status is approve so download link is visible nad when status is in pending and reject then i dont want to visible download link
Diya Ayesa
9-Feb-14 15:49pm
View
is there any their solution?
Diya Ayesa
9-Feb-14 15:38pm
View
yeah i know security probelms and i also login from administrator account but probelm not solve
Diya Ayesa
9-Feb-14 15:37pm
View
see update question please
Diya Ayesa
9-Feb-14 15:18pm
View
so how i resolve this error?
Diya Ayesa
9-Feb-14 14:56pm
View
so what i do>?
Diya Ayesa
6-Feb-14 18:55pm
View
in sp... beacuse user sp is differnet and users choose department and upload documents in any departments whereas suppose admin desigantion is finance then when he upload document then i want to set value in sp for finance beacuse admin not choose departments beacuse his desgiantion is finance and he will not able to upload document to other departments e.g computer science ,hr etc
Diya Ayesa
6-Feb-14 0:11am
View
my question is how i create sp for admins?
Diya Ayesa
5-Feb-14 8:25am
View
i have not any highlight class
Diya Ayesa
5-Feb-14 7:32am
View
whihc style class? u means csstablegenerator or something else?
Diya Ayesa
5-Feb-14 5:03am
View
i already add column please check pic
Diya Ayesa
5-Feb-14 2:25am
View
Deleted
and when i apply your sp ..
then it works like
when supervisor approve document then this document goes to manager for further approval
and it look like this
SeqNo DocID ApproveID AppoveBY DesigID ApproveDate
298 51 3 Sundus Khan 1 2014-02-05 12:07:07.633
299 53 1 Sundus Khan 1 2014-02-05 12:07:24.073
here 3=pending and 1=approve and 1 is designation computer science
and here for further approval manager apporve document and manager view only approve documents but when manager wants to approve document then data is not inserted in table????
and i want like this
SeqNo DocID ApproveID AppoveBY DesigID ApproveDate
298 51 3 Sundus Khan 1 2014-02-05 12:07:07.633
299 53 1 Sundus Khan 1 2014-02-05 12:07:24.073
300 53 1 John 2 2014-02-05 12:07:24.073
here 2=manager
Diya Ayesa
5-Feb-14 0:17am
View
1=approve 2=reject 3=pending
when any user upload new document then this document goes for approval to supervisor then suppose supervisor approve this document then this document approveID goes to 1(approve) in table then when any user upload new document then this document also goes for approval to supervisor suppose supervisor approve this document then this document approveID goes to table that is 1 ... now here the problem is when supervisor already approve first document and the data also save in table with approveID 1(approve) and then supervisor approve 2nd document then data also save in table but with 2nd document data 1st document data again update in table and approve id changes with 1(approve) to 3(pending)
HOPE U GET MY POINT
Diya Ayesa
4-Feb-14 9:13am
View
ok
Diya Ayesa
4-Feb-14 8:49am
View
ok i try this sp
and it works for me
ALTER procedure [dbo].[spadminreg]
@UserName nvarchar(50),
@Password nvarchar(50),
@UserTypeID int,
@DepID int,
@DesigID int,
@emailaddress nvarchar(50),
@PhoneNumber nvarchar(50)
as
if EXISTS(SELECT 1 from Designation where DesigID=@DepID)
begin
select @DesigID as 'SuperVisor'
end
else if EXISTS (select 2 from Designation where DesigID=@DesigID)
begin
select @DesigID as 'Manager'
end
else if EXISTS (select 3 from Designation where DesigID=@DesigID)
begin
select @DesigID as 'Senior Manager'
end
else
insert into [Userss](UserName,Password,UserTypeID,DepID,CreateDate,DesigID,Email ,PhoneNumber)
values
(@UserName,@Password,@UserTypeID,@DepID,GETDATE(),@DesigID,@emailaddress,@PhoneNumber)
but
but when i fill textboxes and select same deisgnation with same department like deisgnation 2 and same department 2
then this record not add in table but in .aspx form it show me
"account add succesfully"
and i want to show failed in label
this is code
protected void Btn_SignUp_Click(object sender, EventArgs e)
{
try
{
c1.SignUp(nametxt.Value, passtxt.Value, Convert.ToInt32(DropDownList1.SelectedValue), Convert.ToInt32(DropDownList2.SelectedValue),Convert.ToInt32(DropDownList3.SelectedValue),mailtxt.Value,numbtxt.Value);
//GridView1.DataSource=ca.viewadmin();
Lbe6.Visible = true;
Lbe6.Text = ("Account Successfully Created");
// GridView1.DataBind();
}
catch
{
lbe5.Visible = true;
lbe5.Text = ("SIGNUP FAILED.PLEASE TRY AGAIN");
}
nametxt.Value = "";
passtxt.Value = "";
mailtxt.Value = "";
numbtxt.Value = "";
}
}
public void SignUp(string Username, string Password, int UserTypeID, int DepID, int desigid,string emailaddress , string PhoneNumber )
{
db.ExecuteNonQuery("spadminreg", new object[] { Username,Password, UserTypeID, DepID,desigid, emailaddress,PhoneNumber });
}
please help meee i will very thankful
Diya Ayesa
4-Feb-14 0:20am
View
Deleted
} }
else
{
Supvisor.Text = "Error";
}
if (mySQLconnection.State == ConnectionState.Open)
{
mySQLconnection.Close();
}
}
catch
{
Supvisor.Text = "Already Approved";
}
}
Diya Ayesa
4-Feb-14 0:06am
View
ok i try this when i upload new document and then supervsior wants to approve this document then record not goes to table
here is code
protected void Button1_Click(object sender, EventArgs e)
{ try
{
string connStr = ConfigurationManager.ConnectionStrings["mydms"].ConnectionString;
SqlConnection mySQLconnection = new SqlConnection(connStr);
string empId = string.Empty;
DataTable dt = new DataTable();
if (mySQLconnection.State == ConnectionState.Closed)
{
mySQLconnection.Open();
for (int i = 0; i < Repeater2.Items.Count; i++)
{
DropDownList DropDownListcontrol = ((DropDownList)Repeater2.Items[i].FindControl("DropDownList4"));
HiddenField DocId = ((HiddenField)Repeater2.Items[i].FindControl("DocId"));
SqlCommand cmd = new SqlCommand("approveddd", mySQLconnection);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@DocID", SqlDbType.Int).Value = Convert.ToInt32((DocId.Value));
cmd.Parameters.Add("@ApproveID", SqlDbType.Int).Value = Convert.ToInt32(DropDownListcontrol.SelectedValue);
cmd.Parameters.Add("@ApproveBy", SqlDbType.VarChar, 50).Value = (Session["Login2"]);
cmd.Parameters.Add("@DesigID", SqlDbType.Int).Value = (Session["UserDesignationID"]);
string DocName = ((Label)Repeater2.Items[i].FindControl("DocName")).Text;
string emailId = ((Label)Repeater2.Items[i].FindControl("YourEamil")).Text;
DropDownList dropdownvalue = ((DropDownList)Repeater2.Items[i].FindControl("DropDownList4"));
string approver = Session["Login2"] != null ? Session["Login2"].ToString() : string.Empty;
string Designationn = Session["UserDesignationID"] != null ? Session["UserDesignationID"].ToString() : string.Empty;
string docname = String.Empty;
string emailID = String.Empty;
string dropdownvalues = String.Empty;
if (Session["Login2"] != null)
{
approver = Session["Login2"].ToString();
}
if (Session["UserDesignationID"] != null)
{
Designationn = Session["UserDesignationID"].ToString();
}
if (DocName.ToString() != "")
{
docname = DocName.ToString();
}
else
{
docname = "Unavailable";
}
if (emailId.ToString() != "")
{
emailID = emailId.ToString();
}
else
{
emailID = "Unavailable";
}
if (dropdownvalue.SelectedItem.ToString() != "")
{
dropdownvalues = dropdownvalue.SelectedItem.ToString();
}
else
{
dropdownvalues = "Unavailable";
}
SendEmailUsingGmail(DocName, emailId, dropdownvalues, approver, Designationn);
cmd.ExecuteNonQuery();
Successz.Text = "Documents Approve and Email Successfully Send To Users"; Convert.ToInt32(DropDownListcontrol.SelectedValue)); }
}
else
Diya Ayesa
3-Feb-14 12:04pm
View
is there any solution to stop save records in table which is already exists in table.. like in above once supervsior approve/reject 16 document then when any supervsior approve/reject documents then 16 document record not save in table beacuse this is aleardy approve/reject
Diya Ayesa
2-Feb-14 14:23pm
View
this is not bids reports
Diya Ayesa
2-Feb-14 14:12pm
View
look when i click on button and want to show report it show me like this
http://i59.tinypic.com/30lyrli.png
Diya Ayesa
2-Feb-14 14:09pm
View
this shows me same errro :(
An error has occurred during report processing.
Cannot create a connection to data source 'DataSource1'.
Login failed for user 'lenovo-pc\Administrator'.
Diya Ayesa
2-Feb-14 14:04pm
View
k i provide this...Data Source=LENOVO-PC\SQLEXPRESS;Initial Catalog=DMSFYPP; User ID=lenovo-pc\Administrator;Password=34234234 but error occur always same...
Diya Ayesa
2-Feb-14 13:56pm
View
what i provide?
Diya Ayesa
2-Feb-14 13:56pm
View
in server name there is LENOVO-PC\SQLEXPRESS and i already provide this in connection string
Diya Ayesa
2-Feb-14 13:54pm
View
this is sql reporting ?
Diya Ayesa
2-Feb-14 13:52pm
View
in my sql server 2008 r2 there is not a username and password my sql is in windows authentication mode
Diya Ayesa
2-Feb-14 13:41pm
View
i specify but not work.... check this image ...http://i61.tinypic.com/1i0bgg.png
Diya Ayesa
2-Feb-14 13:40pm
View
please have a look this image ....http://i61.tinypic.com/1i0bgg.png
Diya Ayesa
2-Feb-14 13:20pm
View
now it shows me error "An error has occurred during report processing.
Cannot create a connection to data source 'DataSource1'"
Diya Ayesa
2-Feb-14 10:00am
View
this is for print and i want to draw it.
Diya Ayesa
2-Feb-14 9:39am
View
this is very complicated
Diya Ayesa
2-Feb-14 7:44am
View
thankx
Diya Ayesa
2-Feb-14 7:43am
View
thanku
Diya Ayesa
2-Feb-14 7:43am
View
thanku
Diya Ayesa
27-Jan-14 5:27am
View
@ravikhoda can u please tell me ?
Diya Ayesa
24-Jan-14 8:12am
View
what is "tid" in code AND Sqldatasource1 in repeater
Diya Ayesa
24-Jan-14 7:02am
View
ok i solve this but when i use sp like this ..
SELECT dbo.DocumentInfo.DocID as DocumentID,
dbo.DocumentInfo.DocName as DocumentName,
dbo.DocumentInfo.UploadedDate as UploadedDate ,
dbo.DocumentInfo.Uploadfile as FileUploaded,
dbo.DocumentInfo.UploadedBy as UploadedBy,
dbo.Department.DepType as Department,
dbo.Approval.ApproveDate,
dbo.ApproveType.ApproveType as Status
FROM dbo.DocumentInfo inner JOIN
dbo.ApproveType ON dbo.DocumentInfo.ApproveID = dbo.ApproveType.ApproveID inner JOIN
dbo.Department ON dbo.DocumentInfo.DepID = dbo.Department.DepID left join
dbo.Approval on dbo.Approval.ApproveID = dbo.ApproveType.ApproveID
WHERE dbo.Approval.DesigID = 3 and [DocName] like '%'+@Name+'%'
and when i first test my sp like this
spsearchdocuments s
and then execute then it shows me records
http://i.stack.imgur.com/JDXQq.png
but when i call this in function and search in project then it shows me no records
please check this image
http://i.stack.imgur.com/ljfXr.png
Diya Ayesa
24-Jan-14 6:21am
View
thanku for suggest me answer @samit kaneriya when i try ur answer then this shows me multiple records for e.g erp system document name have only 1 record in table but it shows me multiple times .... please see this link for image ...
[IMG]http://i41.tinypic.com/8w0cnl.png[/IMG]
Diya Ayesa
24-Jan-14 6:13am
View
Deleted
thanku for suggest me when i try your answer then this shows me like this ...
DocumentIDDocumentNameFileUploadedUploadedDateDepartmentDocumentUploadedByAppoveByStatus
36 ERP SYSTEM system admin first assignment.docx 2014-01-20 22:16:23.327 Computer Science MSWord noreen sundus Approve
38 asdasd CV.docx 2014-01-22 14:02:08.793 Human Resource MSWord amna wajihazeb Approve
38 asdasd CV.docx 2014-01-22 14:02:08.793 Human Resource MSWord amna kaneezkiet Approve
38 asdasd CV.docx 2014-01-22 14:02:08.793 Human Resource MSWord amna wajeeha Approve
37 css Fyp projecthghhf.docx 2014-01-22 13:38:11.193 Computer Science MSWord sundus sundus Pending
36 ERP SYSTEM system admin first assignment.docx 2014-01-20 22:16:23.327 Computer Science MSWord noreen kaneez Approve
36 ERP SYSTEM system admin first assignment.docx 2014-01-20 22:16:23.327 Computer Science MSWord noreen suman Pending
38 asdasd CV.docx 2014-01-22 14:02:08.793 Human Resource MSWord amna suman Reject
Diya Ayesa
24-Jan-14 5:56am
View
it show me datasource null when i set a brakpoint
Diya Ayesa
24-Jan-14 5:50am
View
ok i add clumn now how i set in vs?
Diya Ayesa
23-Jan-14 8:53am
View
thanks for ur reply and how to create that flag?
Diya Ayesa
23-Jan-14 8:53am
View
insert
Diya Ayesa
21-Jan-14 13:19pm
View
what>
Diya Ayesa
21-Jan-14 2:30am
View
CHECK MY UPDATE QUESTION I POST CSS
Diya Ayesa
9-Jan-14 12:46pm
View
oh ho i try to say that this password is by default and it is * so how i get this password in alphabetic form
Diya Ayesa
8-Jan-14 13:25pm
View
but this password available as by default please check this pic
http://i40.tinypic.com/331ovom.png
Diya Ayesa
7-Jan-14 13:50pm
View
ok i find the password but this is in * so how i get?
Diya Ayesa
5-Jan-14 15:02pm
View
please read again my question
Diya Ayesa
26-Dec-13 2:10am
View
ok .... i tried another way that i add column desigation id in approval table like this
SeqNo DocID ApproveID AppoveBy DesigID ApproveDate
258 30 1 sundus 1 2013-12-25 18:34:47.347
259 30 1 kaneez 2 2013-12-25 18:34:47.347
and call in sp like this..
left join dbo.Designation on dbo.Approval.DesigID=dbo.Designation.DesigID
where dbo.Designation.DesigType='Manager'
is it right or wrong?
Diya Ayesa
9-Dec-13 14:11pm
View
but how i apply condition in mail code when stock is less than 50
Diya Ayesa
9-Dec-13 13:45pm
View
i want to send mail when inventory is less than 50 then how to send mail total inventroy is 50
Diya Ayesa
2-Dec-13 20:47pm
View
yes...
Diya Ayesa
2-Dec-13 18:05pm
View
i use web forms not mvc i also drag report view contrl but when i drag it looks this picture which i have posted
Diya Ayesa
28-Nov-13 1:33am
View
html
<div class="CSSTableGenerator">
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="results">
<asp:Repeater ID="Repeater4" OnItemCommand="Repeater4_ItemCommand" runat="server">
<HeaderTemplate>
<tr>
<td>
</td>
<td>
</td>
<td>
Document ID
</td>
<td>
Document Name
</td>
<td>
File Uploaded
</td>
<td>
Uploaded By
</td>
<td>
Document Type
</td>
<td>
Department Type
</td>
<td>
Approve Name
</td>
</tr>
</HeaderTemplate>
<itemtemplate>
<tr>
<td>
<asp:HiddenField ID="HiddenField1" runat="server" Value='<%#DataBinder.Eval(Container.DataItem, "Status")%>'/>
</td>
<td>
<asp:LinkButton ID="LinkButton2" runat="server" CommandArgument='<%# Eval("FileUploaded") %>'
CommandName="download" Visible='<%# Convert.ToString(Eval("Status")).ToUpper() != "Reject" %>' Text="Download" />
</td>
<%-- <td>
<asp:LinkButton ID="LinkButton1" runat="server" CommandArgument='<%# Eval("FileUploaded") %>'
CommandName="download" >Download
</td>--%>
<td>
<%#DataBinder.Eval(Container.DataItem,"DocumentID") %>
</td>
<td>
<%#DataBinder.Eval(Container.DataItem, "DocumentName")%>
</td>
<td>
<%#DataBinder.Eval(Container.DataItem, "FileUploaded")%>
</td>
<td>
<%#DataBinder.Eval(Container.DataItem, "UploadedBy")%>
</td>
<td>
<%#DataBinder.Eval(Container.DataItem, "Document")%>
</td>
<td>
<%#DataBinder.Eval(Container.DataItem, "Department")%>
</td>
<td>
Diya Ayesa
28-Nov-13 1:30am
View
i try this but now work it is always visible in reject
code
protected void Repeater4_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingItem ||
e.Item.ItemType == ListItemType.Item)
{
Label lblStatus = (Label)e.Item.FindControl("HiddenField1");//Change label to other controls like literal as per you are using
// Find the download link control
LinkButton theLinkButtonDownload = e.Item.FindControl("LinkButton2") as LinkButton;
if (lblStatus.Text.Trim() == "APPROVE")//Use String.Compare with ordinal case to check case sensitiveness instead of == operator
{
if (theLinkButtonDownload != null)
{
theLinkButtonDownload.Visible = true;
}
}
else
{
if (theLinkButtonDownload != null)
{
theLinkButtonDownload.Visible = false;
}
}
}
Diya Ayesa
22-Nov-13 6:45am
View
brefily
Diya Ayesa
22-Nov-13 6:45am
View
please explain breifyl
Diya Ayesa
21-Nov-13 15:37pm
View
i try to send mail but when i try above code it can not be show any error and also mail not send to respective email id
Diya Ayesa
21-Nov-13 15:36pm
View
take a look below code ..
protected void Button1_Click(object sender, EventArgs e)
{
string connStr = ConfigurationManager.ConnectionStrings["mydms"].ConnectionString;
SqlConnection mySQLconnection = new SqlConnection(connStr);
string empId = string.Empty;
DataTable dt = new DataTable();
if (mySQLconnection.State == ConnectionState.Closed)
{
mySQLconnection.Open();
for (int i = 0; i < Repeater2.Items.Count; i++)
{
DropDownList DropDownListcontrol = ((DropDownList)Repeater2.Items[i].FindControl("DropDownList4"));
Label DocId = ((Label)Repeater2.Items[i].FindControl("DocId"));
SqlCommand cmd = new SqlCommand("approveddd", mySQLconnection);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@DocID", SqlDbType.Int).Value = Convert.ToInt32((DocId.Text));
cmd.Parameters.Add("@ApproveID", SqlDbType.Int).Value = Convert.ToInt32(DropDownListcontrol.SelectedValue);
cmd.Parameters.Add("@ApproveBy", SqlDbType.VarChar, 50).Value = (Session["Login2"]);
cmd.ExecuteNonQuery();
try
{
if (DropDownListcontrol != null)
{
if (DropDownListcontrol.SelectedValue == "1")
{
//get Current EMAIL_ID from the DataKey
string emailId = ((Label)Repeater2.Items[i].FindControl("Label2")).Text;
//write code to send mail
SendEmailUsingGmail(emailId);
dt.Clear();
dt.Dispose();
}
else if (DropDownListcontrol.SelectedValue == "3")
{
}
}
}
catch (Exception ex)
{
Supvisor.Text = "Failed";
}
finally
{
empId = string.Empty;
}
//UPDATE APPPROVEID IN DOCUMENTINFO TABLE
//DMSLIB.Doc myDoc = new DMSLIB.Doc();
//myDoc.MarkDocAs(Convert.ToInt16(DocId.Text), Convert.ToInt32(DropDownListcontrol.SelectedValue));
}
}
else
{
Supvisor.Text = "Error";
}
if (mySQLconnection.State == ConnectionState.Open)
{
mySQLconnection.Close();
}
}
Diya Ayesa
21-Nov-13 15:33pm
View
yes it is blank like this ""
Diya Ayesa
21-Nov-13 9:45am
View
and it this link only functions are create ..no button click used ...so if i done this then how i call in approve button click event
Diya Ayesa
21-Nov-13 9:28am
View
windows service project?
Diya Ayesa
21-Nov-13 4:27am
View
i dont understand onstop,onpause,timer_eplased,onshutdown, i dont understand it .... when i approve document there is a button when admin click on submit then mail automatically send to respective mail with table values here is the approve code ...now how i combine this approve code and mail code..i dont understand
protected void Button1_Click(object sender, EventArgs e)
{
string connStr = ConfigurationManager.ConnectionStrings["mydms"].ConnectionString;
SqlConnection mySQLconnection = new SqlConnection(connStr);
if (mySQLconnection.State == ConnectionState.Closed)
{
mySQLconnection.Open();
for (int i = 0; i < Repeater2.Items.Count; i++)
{
DropDownList DropDownListcontrol = ((DropDownList)Repeater2.Items[i].FindControl("DropDownList4"));
Label DocId = ((Label)Repeater2.Items[i].FindControl("DocId"));
SqlCommand cmd = new SqlCommand("approveddd", mySQLconnection);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@DocID", SqlDbType.Int).Value = Convert.ToInt32((DocId.Text));
cmd.Parameters.Add("@ApproveID", SqlDbType.Int).Value = Convert.ToInt32(DropDownListcontrol.SelectedValue);
cmd.Parameters.Add("@ApproveBy", SqlDbType.VarChar, 50).Value = (Session["Login2"]);
cmd.ExecuteNonQuery();
//UPDATE APPPROVEID IN DOCUMENTINFO TABLE
//DMSLIB.Doc myDoc = new DMSLIB.Doc();
//myDoc.MarkDocAs(Convert.ToInt16(DocId.Text), Convert.ToInt32(DropDownListcontrol.SelectedValue));
}
}
else
{
Supvisor.Text = "Error";
}
if (mySQLconnection.State == ConnectionState.Open)
{
mySQLconnection.Close();
}
}
Diya Ayesa
21-Nov-13 3:47am
View
please send me ...i try many times but i can't solve this problem
Diya Ayesa
20-Nov-13 15:12pm
View
when i right
instead of left can be always show wrapper in left postion
plzz see this image
http://oi43.tinypic.com/r7ipzr.jpg
Diya Ayesa
15-Nov-13 7:32am
View
this is simple template form but i use this form please check this link
http://www.ajaxshake.com/plugin/EN/1069/7d65a566/registration-form-with-html5-and-css3-registrationform.html
... and i als create sp and funtion
sp
ALTER procedure [dbo].[spinsert]
@MemName nvarchar(50),
@MemPass nvarchar(50),
@Email nvarchar(50)
as
insert into MemberAccount (MemName,MemPass,Email)
values (@MemName,@MemPass,@Email)
funtion
Database db = DatabaseFactory.CreateDatabase("forum");
public void Registration(string MemName, string MemPass, string Email)
{
db.ExecuteNonQuery("spinsert", new object[] { MemName, MemPass, Email});
}
button code
protected void Btn_SignUp_Click (object sender, EventArgs e)
{
try
{
abb.Registration(usernamesignup.Value, password1.Value, emailsignup.Value);
//ab.usernameexist(txt_fullname.Value);
Label1.Text = ("UserName already exist");
//cc.getusername(TextBox1.Text);
//sig.Text = ("Register Success");
Label1.Text = ("Signup Success");
}
catch
{
Label1.Text = ("SignUp failed");
}
usernamesignup.Value = "";
password1.Value = "";
emailsignup.Value = "";
}
Diya Ayesa
14-Nov-13 10:21am
View
like this in call js in pageload .. ClientScript.RegisterStartupScript(GetType(), "Javascript", "javascript:sNotify.addToQueue($('.add_message').attr('value'))();", true);
Diya Ayesa
14-Nov-13 7:53am
View
when i add this html in user page and call in page load then something not in list..
Diya Ayesa
14-Nov-13 7:53am
View
this is in user page?
Diya Ayesa
14-Nov-13 7:48am
View
i write like this in html and it works <asp:Label Id="DocId" text='<%#DataBinder.Eval(Container.DataItem, "DocID")%>' runat="server">
thanku so much for ur suggestions
Diya Ayesa
14-Nov-13 6:53am
View
in html like this.... <td>
<asp:Label Id="DocId" runat="server">
<%#DataBinder.Eval(Container.DataItem, "DocID")%>
</td>
Diya Ayesa
14-Nov-13 6:53am
View
in html?
Diya Ayesa
14-Nov-13 6:49am
View
like in button code i set like this.,,
response.redirect("abc.aspx");
and in user page i set a div like this?
<div visible="true"
is this right?
Diya Ayesa
14-Nov-13 6:46am
View
it is in int in database and then value is save when in database ..when user upload document in documentinfo table then i set a rpimary key in docid in table ..like this
docid docname uploadedby
1 abc def
Diya Ayesa
14-Nov-13 6:35am
View
ok now i try this ...
protected void Button1_Click(object sender, EventArgs e)
{
string connStr = ConfigurationManager.ConnectionStrings["mydms"].ConnectionString;
SqlConnection mySQLconnection = new SqlConnection(connStr);
if (mySQLconnection.State == ConnectionState.Closed)
{
mySQLconnection.Open();
for (int i = 0; i < Repeater2.Items.Count; i++)
{
DropDownList DropDownListcontrol = ((DropDownList)Repeater2.Items[i].FindControl("DropDownList4"));
Label DocId = ((Label)Repeater2.Items[i].FindControl("DocId"));
SqlCommand cmd = new SqlCommand("approveddd", mySQLconnection);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@DocID", SqlDbType.Int).Value = Convert.ToInt32((DocId.Text));
cmd.Parameters.Add("@ApproveID", SqlDbType.Int).Value = Convert.ToInt32(DropDownListcontrol.SelectedValue);
cmd.Parameters.Add("@ApproveBy", SqlDbType.VarChar, 50).Value = (Session["Login2"]);
cmd.ExecuteNonQuery();
//UPDATE APPPROVEID IN DOCUMENTINFO TABLE
DMSLIB.Doc myDoc = new DMSLIB.Doc();
myDoc.MarkDocAs(Convert.ToInt16(DocId.Text), Convert.ToInt32(DropDownListcontrol.SelectedValue));
}
}
else
{
apfi.Text = "Error";
}
if (mySQLconnection.State == ConnectionState.Open)
{
mySQLconnection.Close();
}
}
it shows me error in this line ...
line
cmd.Parameters.Add("@DocID", SqlDbType.Int).Value = Convert.ToInt32((DocId.Text));
error:Input String was not in correct format
Diya Ayesa
14-Nov-13 5:49am
View
Deleted
@kornfeld eliyah peter when i try this it shows me Synatax error, 'try, expected...
code
protected void Button4_Click(object sender, EventArgs e)
{
//string connStr = ConfigurationManager.ConnectionStrings["mydms"].ConnectionString;
//SqlConnection mySQLconnection = new SqlConnection(connStr);
// //try
// //{
// mySQLconnection.Open();
string connStr = ConfigurationManager.ConnectionStrings["mydms"].ConnectionString;
SqlConnection mySQLconnection = new SqlConnection(connStr);
if (mySQLconnection.State == ConnectionState.Closed)
{
mySQLconnection.Open();
}
for (int i = 0; i < Repeater2.Items.Count; i++)
{
DropDownList DropDownListcontrol = ((DropDownList)Repeater2.Items[i].FindControl("DropDownList4"));
Label DocId = ((Label)Repeater2.Items[i].FindControl("DocId"));
SqlCommand cmd = new SqlCommand("approveddd", mySQLconnection);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@DocID", SqlDbType.Int).Value = Convert.ToInt32((DocId.Text));
cmd.Parameters.Add("@ApproveID", SqlDbType.Int).Value = Convert.ToInt32(DropDownListcontrol.SelectedValue);
cmd.Parameters.Add("@ApproveBy", SqlDbType.VarChar, 50).Value = (Session["Login2"]);
cmd.ExecuteNonQuery();
//UPDATE APPPROVEID IN DOCUMENTINFO TABLE
DMSLIB.Doc myDoc = new DMSLIB.Doc();
myDoc.MarkDocAs(Convert.ToInt32(DocId.Text), Convert.ToInt32(DropDownListcontrol.SelectedValue));
}
//catch(Exception ex)
//{
// apfi.Text = ex.Message;
//}
finally
{
mySQLconnection.Close();
}
}
Diya Ayesa
14-Nov-13 5:37am
View
thankx
Diya Ayesa
14-Nov-13 5:34am
View
html code is in admin page and when admin click on button then notifaction send to user page its mean i put empty div on user page?
Diya Ayesa
13-Nov-13 13:57pm
View
THERE IS ONLY ONE CHECK BOX IN EACH ROW
Diya Ayesa
13-Nov-13 9:24am
View
removing try catch may be bracket error comes in this...//catch (Exception ex)
//{
apfi.Text = ex.Message;
//}
Diya Ayesa
13-Nov-13 9:15am
View
so what i write instead of try catch
Diya Ayesa
13-Nov-13 7:44am
View
how?
Diya Ayesa
13-Nov-13 7:37am
View
u can not understand my question.....look there is one form which is admin.aspx then in this i write this html code because when admin login then when he click on button(so why i write visible=false if i write this then how admin click on button) then notification send to users form which is users.aspx and user page load i write code which i mentioed in question which is clientscript....... ?
Diya Ayesa
13-Nov-13 7:22am
View
but if i done this it is hidden from form admin form.. nad how admin send notifacation in
user form
Diya Ayesa
13-Nov-13 7:21am
View
@Vishal Pand3y like this? ....
<div runat="server" id=hiddenn"> <asp:Button ID="notic" runat="server" Text="Send" onclick="Button1_Click" /> <br /> <input class="add_message" type="text" value="type your message" name="add_message"></input> <input type="button" value="add message" önclick="sNotify.addToQueue($('.add_message').attr('value'))"/> </div>
Diya Ayesa
13-Nov-13 7:20am
View
like this? ....
<div runat="server" id=hiddenn">
<asp:Button ID="notic" runat="server" Text="Send" onclick="Button1_Click" /> <br />
<input class="add_message" type="text" value="type your message"
name="add_message"></input>
<input type="button" value="add message"
önclick="sNotify.addToQueue($('.add_message').attr('value'))"/>
</div>
Diya Ayesa
13-Nov-13 7:10am
View
in html?
Diya Ayesa
13-Nov-13 3:41am
View
ahhha ..:P
Diya Ayesa
13-Nov-13 2:44am
View
ok i done with this ....if (!Page.IsPostBack)
{
Session["a"] = em.Depdocuments(Convert.ToString(Session["Login2"]), (Convert.ToString(Session["Login3"])));
Repeateremail.DataSource = emailll.emailsent(Convert.ToInt32(Session["a"]));
Repeateremail.DataBind();
this.checkbox1.visible = false;
}
but it show me error
error : 'FYPDMS.email' does not contain a definition for 'checkbox1' and no extension method 'checkbox1' accepting a first argument of type 'FYPDMS.email' could be found (are you missing a using directive or an assembly reference?)
Diya Ayesa
13-Nov-13 2:38am
View
haha ...yes :P how did u got it?
Diya Ayesa
10-Nov-13 9:04am
View
beacuse i save in manager in desgination table
Diya Ayesa
8-Nov-13 15:15pm
View
where as users have no designations
Diya Ayesa
8-Nov-13 15:12pm
View
where i done this??in login form?
Diya Ayesa
8-Nov-13 14:16pm
View
where is manager is also admin
Diya Ayesa
8-Nov-13 14:16pm
View
i mentioned it 1 is admin and 2 is user and manager login for approving/reject documents
Diya Ayesa
8-Nov-13 12:29pm
View
i don't think so...because is css is perfectly fine
Diya Ayesa
7-Nov-13 4:14am
View
alter procedure spmanager
@UserID int
as
Select
dbo.DocumentInfo.DocID as DocumentID,
dbo.DocumentInfo.DocName as DocumentName,
dbo.DocType.DocType as Document,
dbo.DocumentInfo.ApproveID as ApproveType,
dbo.Department.DepType as Department,
dbo.DocumentInfo.Uploadfile as FileUploaded,
dbo.ApproveType.ApproveType AS ApproveID ,
dbo.Approval.AppoveBy as ApproveBy,
dbo.DocumentInfo.UserID as Usersid
FROM
dbo.DocumentInfo
inner JOIN dbo.DocType ON dbo.DocumentInfo.DocTypeID=dbo.DocType.DocTypeID
inner JOIN dbo.Department ON dbo.DocumentInfo.DepID=dbo.Department.DepID
left join dbo.ApproveType on dbo.DocumentInfo.ApproveID=dbo.ApproveType.ApproveID
left join dbo.Approval on dbo.Approval.AppoveBy =dbo.DocumentInfo.UserID
where UserID=@UserID
Diya Ayesa
7-Nov-13 4:11am
View
please see the link
Diya Ayesa
6-Nov-13 3:36am
View
????????
Diya Ayesa
5-Nov-13 10:50am
View
Deleted
in 1st option what they will use check box or a approve /reject buttons in gridview?
Diya Ayesa
5-Nov-13 10:49am
View
i use dropdown in gridview
Diya Ayesa
5-Nov-13 10:32am
View
docid
Diya Ayesa
3-Nov-13 12:44pm
View
i posted that
i want to show that when user login then they will be able to see pop up when admin login to their account and when approve/rejected his documents then pop up box will appear to users accounts (when user login then pop up appear) that ur document is approve/rejected...
Diya Ayesa
3-Nov-13 10:10am
View
the question is this"but in this i want when this abc user login then he/she able to see notifications that your document appproved/rejected "
but i am using pop up can you see the link which i posted so you better understand what i try to ask
Diya Ayesa
28-Oct-13 9:23am
View
THANKS A LOT =)
Diya Ayesa
28-Oct-13 8:41am
View
when i done this it shows me error in this line <asp:Repeater ID="Repeater1" OnItemCommand="Repeater1_ItemCommand" runat="server">
ERROR:
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: CS0123: No overload for 'Repeater1_ItemCommand' matches delegate 'System.Web.UI.WebControls.RepeaterCommandEventHandler'
Source Error:
Line 97: <div class="CSSTableGenerator" >
Line 98: <table border="0" width="100%" cellpadding="0" cellspacing="0" id="results">
Line 99: <asp:Repeater ID="Repeater1" OnItemCommand="Repeater1_ItemCommand" runat="server">
Line 100: <HeaderTemplate>
Line 101: <tr>
Diya Ayesa
28-Oct-13 7:33am
View
yes
Diya Ayesa
23-Oct-13 16:07pm
View
sorry i dont understand what u say
Diya Ayesa
23-Oct-13 13:54pm
View
????
Diya Ayesa
23-Oct-13 6:08am
View
i use sphrdoc2 .......
public DataTable gethrdoc22(int id)
{
return db.ExecuteDataSet("sphrdoc2", new object[] { id }).Tables[0];
}
Diya Ayesa
23-Oct-13 4:25am
View
ok nw i try this sp but it alwayas not show me gridview...
ALTER procedure [dbo].[sphrdoc2]
@UserID int
as
SELECT DocumentInfo.DocID,
dbo.DocumentInfo.DocName,
dbo.DocumentInfo.Uploadfile,
dbo.DocType.DocType,
dbo.Department.DepType ,
dbo.ApproveType.ApproveType AS ApproveID
FROM dbo.DocumentInfo
LEFT JOIN dbo.DocType ON dbo.DocumentInfo.DocTypeID=dbo.DocType.DocTypeID
LEFT JOIN dbo.Department ON dbo.DocumentInfo.DepID=dbo.Department.DepID
LEFT JOIN dbo.ApproveType ON dbo.ApproveType.approveid=dbo.Department.DepID where UserID=@UserID
Diya Ayesa
22-Oct-13 15:52pm
View
when i set a break point and point out the datasource it shows me this..."GrdFileApprove.DataSource = null"
Diya Ayesa
22-Oct-13 15:45pm
View
now i try this sp
alter procedure sphrdoc2
@UserID int
as
select * from DocumentInfo where UserID=@UserID
and when i test the query as this
sphrdoc2 6
it show me this
DocID DocDesciption DocName Uploadfile DocTypeID DepID ApproveID UploadedBy UserID
8 paperssSSS SDASDASD dsfsdf.docx 1 4 NULL john 6
9 hr report dr reprt n analysis HR.docx 1 4 NULL john 6
10 hr reprttt hr report HR.docx 1 4 NULL john 6
and then i try thison page load
GrdFileApprove.DataSource = dd.gethrdoc22(Convert.ToInt32(Session["Userid"]));
GrdFileApprove.DataBind();
but whne i debug it can not show me any documents in form
Diya Ayesa
22-Oct-13 15:43pm
View
when i set a breakpoint and point out the datasource it shows me this...GrdFileApprove.DataSource = null
Diya Ayesa
22-Oct-13 15:04pm
View
yes i set a breakpoint but it can not even go on that line <asp:BoundField DataField="DocType" HeaderText="Document" />
and it show me error on this line GrdFileApprove.DataBind();
Diya Ayesa
22-Oct-13 14:43pm
View
but in database there is record of doctype
Diya Ayesa
22-Oct-13 14:14pm
View
when i try this it shows me error
The name 'dtResult' does not exist in the current context
Diya Ayesa
21-Oct-13 12:19pm
View
where i done this
Diya Ayesa
21-Oct-13 12:14pm
View
i posted plz check
Diya Ayesa
21-Oct-13 12:07pm
View
i passing the parameter in this
getdocall1(int userid)
and in this (Convert.ToInt32(Session["UserID"]));
i aready save userid in sessions
Diya Ayesa
21-Oct-13 12:04pm
View
yes i deleted this post .....
Diya Ayesa
21-Oct-13 11:59am
View
i understand the error but i pass only one paramater so why this error comes?
Diya Ayesa
21-Oct-13 11:49am
View
ok i try this
create procedure [dbo].[dddddd]
@userid int
as
SELECT di.DocID,
di.DocName,
di.Uploadfile,
dt.DocType,
d.DepType,
at.ApproveType
FROM DocumentInfo di
JOIN
DocType dt ON dt.DocTypeID = di.DocTypeID
JOIN
Department d ON d.DepID = di.DepID
join
Userss ON d.DepID = dbo.Userss.DepID AND di.DocID = dbo.Userss.DocID
LEFT OUTER JOIN
Approval a ON a.DocID = di.DocID
JOIN
ApproveType at ON at.ApproveID = ISNULL(a.Approveid, 3)
where Userss.USERID=@userid
and then create a fucntion
public DataTable getdocall1(int userid)
{
return db.ExecuteDataSet("dddddd").Tables[0];
}
and then
protected void Page_Load(object sender, EventArgs e)
{
GridView1.DataSource = dwww.getdocall1(Convert.ToInt32(Session["UserID"]));
GridView1.DataBind();
}
then it shows me error
The number of parameters does not match number of values for stored procedure.
in this line
return db.ExecuteDataSet("dddddd").Tables[0];
Diya Ayesa
21-Oct-13 11:44am
View
Deleted
ok i try this
create procedure [dbo].[ddd]
@userid int
as
SELECT di.DocID,
di.DocName,
di.Uploadfile,
dt.DocType,
d.DepType,
at.ApproveType
FROM DocumentInfo di
JOIN
DocType dt ON dt.DocTypeID = di.DocTypeID
JOIN
Department d ON d.DepID = di.DepID
INNER JOIN
dbo.Userss ON d.DepID = dbo.Userss.DepID
join
dbo.Userss ON d.DepID = dbo.Userss.DepID AND DocumentInfo.DocID = dbo.Userss.DocID
LEFT OUTER JOIN
Approval a ON a.DocID = di.DocID
JOIN
ApproveType at ON at.ApproveID = ISNULL(a.Approveid, 3)
where Userss.USERID=@userid
but it shows me error
"The objects "dbo.Userss" and "dbo.Userss" in the FROM clause have the same exposed names. Use correlation names to distinguish them.
Diya Ayesa
21-Oct-13 11:22am
View
how i done this with userid? beacuse i define users through departments like which user is link to which department
Diya Ayesa
21-Oct-13 11:18am
View
i change it but when i login through computer science admin then it still shows me all documents??
Diya Ayesa
21-Oct-13 11:09am
View
when i add like this WHERE DepID = @DepID it show me error
Ambiguous column name 'DepID'.
Diya Ayesa
16-Oct-13 4:27am
View
plz see this article i post in deatiledd..
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/0dc095de-a0dc-4884-ab5a-58ffe9abd3f0/store-peocedures?forum=sqldataaccess
Diya Ayesa
16-Oct-13 3:48am
View
i want to add a column pending in gridview through store procedure..means that when any user upload document then in grid-view automatically status display as pending the above query which i posted as a show upload documents now in this i want to add pending status i have a separate approve type table in which approveid ,approvetype(1 approve 2 reject ,3 pending) ...and i show pedning in grdiview . @bryce
Diya Ayesa
14-Oct-13 16:20pm
View
@thatraja i try to understand this link but i can not understandd..:/
Diya Ayesa
9-Oct-13 7:36am
View
yeah but it is not related to my question
Diya Ayesa
8-Oct-13 13:40pm
View
????//
Diya Ayesa
8-Oct-13 13:22pm
View
how i done with code?plz give me idea
Diya Ayesa
8-Oct-13 13:10pm
View
or i can hide row when once approved/reject document
Diya Ayesa
8-Oct-13 11:56am
View
how?
Diya Ayesa
7-Oct-13 15:48pm
View
ok i add this one..
SqlCommand cmd = new SqlCommand("approved", mySQLconnection);
cmd.Parameters.Add("@ApproveBy", SqlDbType.VarChar, 50).Value = Convert.ToString(Session["Login2"]);
cmd.Parameters.Add("@UserID", SqlDbType.Int).Value = Convert.ToInt32(GrdFileApprove.DataKeys[row.RowIndex]["UserID"]);
cmd.Parameters.Add("@DocID", SqlDbType.Int).Value = Convert.ToInt32(GrdFileApprove.DataKeys[row.RowIndex]["DocID"]);
cmd.Parameters.Add("@ApproveID", SqlDbType.Int).Value = DropDownListcontrol.SelectedValue;
cmd.ExecuteNonQuery();
it show me error in this line
cmd.Parameters.Add("@UserID", SqlDbType.Int).Value = Convert.ToInt32(GrdFileApprove.DataKeys[row.RowIndex]["UserID"]);
error
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Diya Ayesa
7-Oct-13 15:35pm
View
i try so may times to fix but i can't thats y ask the question
Diya Ayesa
7-Oct-13 15:34pm
View
in documentinfo table there are several docid ...so how i solve it...
Diya Ayesa
7-Oct-13 15:30pm
View
there is no soultion yettt..
Diya Ayesa
7-Oct-13 15:22pm
View
yes i comment on it..would u plz tell me any other solution
Diya Ayesa
7-Oct-13 15:12pm
View
in above code..forget about cmd.ExeucuteNonquery();
an when i set a breakpoint it show me user '10' and docid '0' approveid '0' approveby 'sundus'
Diya Ayesa
7-Oct-13 15:06pm
View
would u please tell me i use correct sp or not?
Diya Ayesa
7-Oct-13 15:05pm
View
yes it is present in documentinfo table.. and there are also several documents in dcumentinfo table
Diya Ayesa
6-Oct-13 13:04pm
View
can u tell me..
Diya Ayesa
6-Oct-13 13:03pm
View
look this...if (!Page.IsPostBack)
{
DMSLIB.DocTypee dtt = new DMSLIB.DocTypee();
Docdrop.DataSource = dtt.getfile();
Docdrop.DataValueField = "DocTypeID";
Docdrop.DataTextField = "DocType";
Docdrop.DataBind();
DMSLIB.DepType DEP = new DMSLIB.DepType();
DropDownList2.DataSource = DEP.getdep();
DropDownList2.DataValueField = "DepID";
DropDownList2.DataTextField = "DepType";
DropDownList2.DataBind();
if (Session["UserID"] != null)
{
//Store the value into a variable
int userId = Convert.ToInt32(Session["UserID"]); //you could also use Convert.ToInt32(Session["UserID"]);
}
Diya Ayesa
6-Oct-13 13:02pm
View
i done this i page loadddd of login.aspx.cs and upload.aspx.cs
Diya Ayesa
6-Oct-13 12:36pm
View
here is the code of upload.....if (FileUploadControl.PostedFile != null && FileUploadControl.PostedFile.ContentLength > 0)
{
if
(FileUploadControl.FileContent.Length < 100000)
{
string filename = Path.GetFileName(FileUploadControl.PostedFile.FileName);
string folder = Server.MapPath("~/Docfiles/");
Directory.CreateDirectory(folder);
FileUploadControl.PostedFile.SaveAs(Path.Combine(folder, filename));
try
{
cc.upload1(Txt_docde.Value, txt_dname.Value, FileUploadControl.FileName, Convert.ToInt32(Docdrop.SelectedValue), Convert.ToInt32(DropDownList2.SelectedValue), Convert.ToString(Session["Login2"]),Convert.ToInt32(Session["UserID"]));
StatusLabel.ForeColor = System.Drawing.Color.Green;
StatusLabel.Text = "Success";
}
catch
{
StatusLabel.ForeColor = System.Drawing.Color.Red;
StatusLabel.Text = "Failed";
}
}
else
{
StatusLabel.ForeColor = System.Drawing.Color.Red;
StatusLabel.Text = "File Size to big";
}
Diya Ayesa
6-Oct-13 12:31pm
View
when i upload document and then i check my document table it show me userid 0 ..check image which i posted
Diya Ayesa
6-Oct-13 11:59am
View
i add in upload.aspx.cs code in load page ............if (Session["UserID"] != null)
{
//Store the value into a variable
int userId = Convert.ToInt32(Session["UserID"]); //you could also use Convert.ToInt32(Session["UserID"]);
}
Diya Ayesa
6-Oct-13 11:35am
View
i also add userid field in document table and in usertable and i also insert userid in sp..this is sp ..
ALTER procedure [dbo].[upload5]
@DocDesciption nvarchar(50),
@DocName nvarchar(50),
@Uploadfile nvarchar(50),
@DocTypeID int,
@DepID int,
@UploadedBy nvarchar(50),
@UserID int
as
insert into DocumentInfo(DocDesciption,DocName,UploadedDate,Uploadfile,DocTypeID,DepID,UploadedBy,UserID )
values(@DocDesciption,@DocName,GETDATE(),@Uploadfile,@DocTypeID,@DepID,@UploadedBy,@UserID )
Show More