Selected tickets are shown in the booking details page instead of date - asp.net

[eenter image description herenter image description here](https://i.stack.imgur.com/diMU2.jpg)My project is amusement park ticket booking system I am doing with the help of .net and c# and SQL server so my main problem is in booking details in date section selected no of tickets are displayed instead of date.
I have write in c# code Response.Redirect("MyBooking.aspx?I'd=" + e.CommandArgument.ToString() + "&tickets=" + list.SelectedItem.Tostring() + "&date=" + list.SelectedItem.ToString());
I think I am writing in "&date" = + list.SelectedItem.ToString()
So instead of Selected item.ToString() what need to be write

Related

Wrong date format when i create an event in google calendar

I use a google form to create event in my calendar. The date format recorded on my spreadsheet is European DD/MM/YYYY but at the event creation google calendar put the date info in the Us format MM/DD/YYYY. So, events are displayed in my calendar at the wrong dates...
Ive check my gsuite account, drive, sheet are set to the right language and timezone (FRANCE / PARIS).
can you help me ?
Thx.
ex. MR ZAZOU 2th March -----> 4th Feb
EDIT: last code i use to create event
function createEvent_ (namedValues) {
//options are the key/value pairs you can set when created a
//calendar event, below accesses the data given for description
//and location - guest is hard coded
var options = { description: namedValues.Description[0],
ocation: namedValues.Location[0],
guests:"exemple"};
//cEvent makdes the calendar event, You have to choose the calendar
//name that you would like to use, then ask for the Name of the event,
//start date and end date, then passes the options you have selected above
var cEvent = CalendarApp.getCalendarsByName("Example")[0].createEvent(
namedValues.Name[0],
new Date(namedValues.Starts),
new Date(namedValues.Ends),
options)
}
Ok, got it !
The problem was from the google form addon "Form publisher". Ive add an extra date field in my form for testing. In the form editor, the date format showed by google is the right one, but when i explore the template option of Form publisher, the format was named with wrong format.

show only one date picker when creating new appointment telerik

Can i create a new appointment inside rad Scheduler based on a single date(select only one day without the need of selecting start date and end date)
For example if we have an occasion like birthday the user should have only one date picker to select the day of the birthday without the need of selecting start day and end day.
Please review the attached picture to help you understand more what i need.
enter image description here
Telerik supports creating custom Scheduler Edit form Templates. See any of the links below for sample code:
http://docs.telerik.com/devtools/aspnet-ajax/controls/scheduler/how-to/customize-the-advanced-form-template
http://demos.telerik.com/aspnet-ajax/scheduler/examples/raddock/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/scheduler/examples/advancedformtemplate/defaultcs.aspx
It should also be possible to intercept the client-side event when the edit form is being shown and hide the control you want hidden at that time.
http://blogs.msmvps.com/bmains/2010/08/15/telerik-radscheduler-client-side-capabilities-part-2-the-advanced-form/

Data Audit trail for reportviewer SSRS

I want to get an idea about how can i capture the data audit trail of SSRS report getting rendered in Asp.net reportviwer.
I dont want the execution log. Example my report take department as input and give all details of employee working in that department.
Now my requirement is that, lets say i run the report for department a and get some employee then i have to log a audit trail saying i have seen records of so and so employee.
I was thinking that from SSRS itself i can insert the record which are retrieved or to be rendered but what if rendering failed, my log will still say that i have seen the record even before it appearing on ASP.Net page. Second way is that i have to make another call after data is rendered with same parameter and then log the result which can give me wrong result as data might have changed in that small interval.
secondly is there a way to track the save and print event On asp.net reportviewer control
looking forward for ideas. Thanks in advance.
Reporting Services may not be the solution for you if you want to add behaviour to data access. Reports are best as a display of data, not having side effects.
That said, probably the best you can do is to audit the rendering process using custom code. For instance, when you go to display the employee code you call a function recording that it was displayed and by who:
Function AuditEmployeeAccess(EmployeeCode As String) As String
' Connect to database, audit access (off the top of my head, could be bad)
Dim con As New SqlConnection
Dim cmd As New SqlCommand
con.ConnectionString = "Data Source=MyServer;Initial Catalog=AuditDb;User ID=username;Password=password"
con.Open()
' Don't do this, use parameters
cmd.CommandText = ("insert into audit (AuditEmployeeCode, AccessEmployeeCode) values ('" + Globals!UserId.Value + "', '" + EmployeeCode + "')")
cmd.Connection = con
cmd.ExecuteNonQuery()
con.Close()
' Return the employee code for display in the report
Return EmployeeCode
End Function
then instead of the cell holding the field value, it uses the expression:
=Code.AuditEmployeeAccess(Fields!EmployeeCode.Value)
Now this will audit whenever the employee code renders rather than when it is looked at. For instance, if the report is 5 pages long but the viewer only looks at the first two pages the access will still be audited for those on page 5.
For this reason you are probably better off creating a custom screen rather than using a report.

Is there any way to retrieve Amazon product code?

I am trying to display the amazon products of a specific category on my website using amazon product advertising api.
I am writing code is asp.net.
I am being able to successfully retrieve its price, title,image,url.I also want to get its product id that amazon uses.I had a look at its documentation in which they had mentioned something about the UPC(universal product code) and ASIN.But they have explained look up search based on UPC and ASIN.
I am too confused as to how to get its product id.
String requestString ="Service=AWSECommerceService"
+ "&Version=2013-29-03"
+ "&Operation=ItemSearch"
+ "&AssociateTag=myassociatetag"
+ "&SearchIndex=" +category
+ "&ItemPage=5"
+ "&Sort=relevancerank"
+ "&ResponseGroup=ItemAttributes,Images"
+ "&Keywords=" + keyword
+ "&Timestamp=[YYYY-MM-DDThh:mm:ssZ]"
;
Can you please help me and tell me where to add itemid in this requeststring.
Thank you .
Add the response group "ItemIds" to retrieve "ASIN" into your request parameter
"&ResponseGroup=ItemAttributes,Images,ItemIds"
UPC is returned by "ItemAttributes" response group which is already in your code.it will only return UPC if it exists in Amazon Database.

A hyperlink on Crystal Reports should open another report and pick Session value

I am using Visual Studio 2005 Professional Edition [ASP.NET with C#].
I have a Crystal Report with a column is shown as a hyperlink. On clicking any hyperlinked value of any row, another report should open but I have three issues to be addressed:
The URL of the second report should be handled via Server.Transfer method to hide the page name from the URL.
The hyperlinked text, where the user has clicked to open second report, should be passed to the second report.
The second report is connected with SQL command as database back-end. I want to pass a Session value as a parameter to the SQL command being used by the second report.
You're hyperlink will need to reference a URL that will perform a Server.Transfer--Crystal Reports does not support this.
You will need to embed this text in the query string.
You will need to embed the logon token in the query string.
To dynamically construct a querystring, edit the conditional formula that is associated with the field's Hyperlink infomation (right click field; Format Field...; Hyperlink tab). It might resemble:
//change to reflect your situation
"http://server:port/resource/redirect.aspx?reportname=" + [report name here] + "&token=" + [logon token here]
If you are using BusinessObjects Enterprise, you may want to investigate URLReporting.

Resources