|
I'm using google api 2.0 for .net. I use this code to create a new calendar:
CalendarEntry calendar = new CalendarEntry();
calendar.Title.Text = "Little League Schedule";
calendar.Summary.Text = "This calendar contains the practice schedule and game times.";
calendar.TimeZone = "America/Los_Angeles";
calendar.Hidden = false;
calendar.Color = "#2952A3";
calendar.Location = new Where("", "", "Oakland");
Uri postUri = new Uri("https://www.google.com/calendar/feeds/default/owncalendars/full");
CalendarEntry createdCalendar = (CalendarEntry) service.Insert(postUri, calendar);
but, on execution, return the error:
Execution of request failed
at the line
CalendarEntry createdCalendar = (CalendarEntry) service.Insert(postUri, calendar);
However, if I connect to google calendar with the browser, the new calendar is created.
Also, I use this code to retriving all calendars and it's works
CalendarQuery query = new CalendarQuery();
query.Uri = new Uri("https://www.google.com/calendar/feeds/default/allcalendars/full");
CalendarFeed resultFeed = (CalendarFeed) service.Query(query);
Any suggestions?? Thanks
|
|
|
|
|
Looks almost identical to the example from the manual. Did you call the authenticate-method of the service object?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
yes, the code is identical. I'm writing a test application.
For authentication I used this code:
CalendarService service = new CalendarService(companyName + "-" + applicationName + "-" + versionID);
service.setUserCredentials(_uid, _psw);
|
|
|
|
|
Multiple versions of the same libraries, some deprecated, some not. Poor documentation..
First tried your version of the sample, and it failed to work. Apparently the version of the assemblies do not match the ones described in the docs.
Download the SDK here; http://code.google.com/p/google-gdata/[^]
Next, download ILSpy, and open the binary called "Calender.exe" located under
C:\Program Files (x86)\Google\Google Data API SDK\Samples\
Open the SampleApp namespace and select the Calender-class. You'll get a decompiled version on the right-side of your screen. Expand each method to see it's body, copy & paste it to a test-project, and run
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I found the problem ... I set the property value calendar.TimeZone = "Italy / Rome" but the correct value is "Europe / Rome".
thanks!
|
|
|
|
|
Cool - you're welcome 
|
|
|
|
|
How can i Import Data of a Dataview in wpf to MsWord
|
|
|
|
|
|
|
List lstusers = new List();
lstusers = AMSManagement.GetAllUsers();
var lnquser = from u in lstusers
show error here plz help me!!!
-------------
where u.User_ID == int.Parse(Session["UserID"].ToString()) && u.Pass_word == txtopwd.Text.Trim()
select u;
--------------------
if (lnquser.ToList().Count > 0)
{
users u = new users();
u.User_ID = int.Parse(Session["UserID"].ToString());
u.Pass_word = txtcnpwd.Text.Trim();
AMSManagement.Changepassword(u);
lblmsg.Text = "Password Changed Successfully!";
}
|
|
|
|
|
Are you very sure the session contains UserID?
Try with the following code:
where u.User_ID == int.Parse(Session["UserID"]==null? "0":Session["UserID"].ToString()) && u.Pass_word == txtopwd.Text.Trim()
|
|
|
|
|
List<users> lstusers = new List<users>();
lstusers = AMSManagement.GetAllUsers();
var lnquser = from u in lstusers
where u.User_ID == int.Parse(Session["UserID"] == null ? "0" : Session["UserID"].ToString())&& u.Pass_word==txtopwd.Text.Trim()
select u;
if (lnquser.ToList().Count > 0)
{
users u = new users();
u.User_ID = int.Parse(Session["UserID"].ToString());
u.Pass_word = txtcnpwd.Text.Trim();
AMSManagement.Changepassword(u);
lblmsg.Text = "Password Changed Successfully!";
}
else
{
lblmsg.Text = "plz enter valid old password!";
}
when i change code as your view then it execute else part
|
|
|
|
|
Could you please debug and check the value of Session["UserID"]
I think Session["UserID"] is not initiated.
|
|
|
|
|
|
Could you please post the code where are you setting the value of Session["UserID"]?
|
|
|
|
|
public int User_ID { set; get; }
public string UserID { set; get; }
public string Pass_word { set; get; }
public string UserType { set; get; }
|
|
|
|
|
you need to check the value of the UserID
string UserID = Session["UserID"].ToString();
I would put this before the LinQ statement and put a breakpoint on it, step over that line and then see what if any value UserID holds. So change your code to
string UserID = Session["UserID"].ToString();
var Inquser = from u in lstusers where u.User_ID == int.Parse(Session["UserID"].ToString()) && u.Pass_word == txtopwd.Text.Trim();
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Try this instead:
int userId;
object sessionValue = Session["UserID"];
string session = string.Empty;
string password = txtopwd.Text;
if (session != null && int.TryParse(session.ToString(), out userId) && !string.IsNullOrWhitespace(password))
{
var lnguser = from u in lstusers where u.User_ID == userId && u.Pass_word == password.Trim();
}
|
|
|
|
|
|
Sorry, but that makes no sense at all.
Use the best guess
|
|
|
|
|
정성만 wrote: Barcode image binary data must be sent to the printer. Printers do not know how to decode "random" image-formats, and can't handle that kind of data. There's a printer-driver that translates it to the printer-language of that specific brand of printer. Create a <a href="http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx">PrintDocument</a>[<a href="http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx" target="_blank" title="New Window">^</a>] and implement the "PrintPage" event. It has a nice Graphics object that you can draw your image on.
Also, you'd get more useful replies if you added your printing-code to the post. It often shows the intention of the programmer better than a picture can.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
why is my query wrong at FROM ?
i want to connect two tables so i can get some specific data but c# appear error.
try
{
//Set the command string
string Cmd = "SELECT * FROM Robberies_Table JOIN Branches_Table ON Robberies_Table.BranchCode =Branches_Table.BranchCode ;";
//create new new connection to the database
OleDbConnection conn = new OleDbConnection(ConnectionString);
//create new data adapter
OleDbDataAdapter Adapter = new OleDbDataAdapter(Cmd, conn);
//create new command builder
OleDbCommandBuilder CmdBuilder = new OleDbCommandBuilder(Adapter);
dTable = new DataTable();
Adapter.Fill(dTable);
conn.Close();
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
}
//return the search results on a datatable
return dTable;
}
|
|
|
|
|
Your SQL query has a semi-colon in there. Remove it.
|
|
|
|
|
i remove inner semi-colon but the query has error again at from field .
string Cmd = "SELECT * FROM Robberies_Table JOIN Branches_Table ON Robberies_Table.BranchCode =Branches_Table.BranchCode ";
|
|
|
|
|
A couple of things:
- What error does it come up with? Give us a fighting chance here.
- What happens if you run this query directly against your database?
|
|
|
|