Click here to Skip to main content
15,896,526 members
Home / Discussions / C#
   

C#

 
GeneralRe: continue if loop if failed Pin
Eddy Vluggen20-Sep-14 0:18
professionalEddy Vluggen20-Sep-14 0:18 
AnswerRe: continue if loop if failed Pin
Dominic Burford22-Sep-14 0:03
professionalDominic Burford22-Sep-14 0:03 
Questionc# unable to coonect with xls file using LinqToExcel Please help Pin
Member 1105342019-Sep-14 5:11
Member 1105342019-Sep-14 5:11 
AnswerRe: c# unable to coonect with xls file using LinqToExcel Please help Pin
PIEBALDconsult19-Sep-14 5:20
mvePIEBALDconsult19-Sep-14 5:20 
QuestionRe: c# unable to coonect with xls file using LinqToExcel Please help Pin
ZurdoDev19-Sep-14 10:55
professionalZurdoDev19-Sep-14 10:55 
Questionc# LinqToExcel is not connecting to XLS in 64bit system but it is connecting xlsx file, tried DatabaseEngine.ace but didn't worked out. Pin
Member 1105342019-Sep-14 5:08
Member 1105342019-Sep-14 5:08 
AnswerRe: c# LinqToExcel is not connecting to XLS in 64bit system but it is connecting xlsx file, tried DatabaseEngine.ace but didn't worked out. Pin
PIEBALDconsult19-Sep-14 5:22
mvePIEBALDconsult19-Sep-14 5:22 
AnswerRe: c# LinqToExcel is not connecting to XLS in 64bit system but it is connecting xlsx file, tried DatabaseEngine.ace but didn't worked out. Pin
Eddy Vluggen19-Sep-14 7:16
professionalEddy Vluggen19-Sep-14 7:16 
QuestionResize Control Pin
AmbiguousName18-Sep-14 21:09
AmbiguousName18-Sep-14 21:09 
AnswerRe: Resize Control Pin
OriginalGriff18-Sep-14 21:41
mveOriginalGriff18-Sep-14 21:41 
GeneralRe: Resize Control Pin
AmbiguousName18-Sep-14 21:48
AmbiguousName18-Sep-14 21:48 
AnswerRe: Resize Control Pin
BillWoodruff18-Sep-14 21:41
professionalBillWoodruff18-Sep-14 21:41 
GeneralRe: Resize Control Pin
AmbiguousName18-Sep-14 21:52
AmbiguousName18-Sep-14 21:52 
GeneralRe: Resize Control Pin
Rob Philpott18-Sep-14 22:12
Rob Philpott18-Sep-14 22:12 
GeneralRe: Resize Control Pin
BillWoodruff18-Sep-14 22:58
professionalBillWoodruff18-Sep-14 22:58 
GeneralRe: Resize Control Pin
Rob Philpott19-Sep-14 0:28
Rob Philpott19-Sep-14 0:28 
AnswerRe: Resize Control Pin
Richard MacCutchan18-Sep-14 22:18
mveRichard MacCutchan18-Sep-14 22:18 
GeneralRe: Resize Control Pin
AmbiguousName19-Sep-14 0:20
AmbiguousName19-Sep-14 0:20 
GeneralRe: Resize Control Pin
Richard MacCutchan19-Sep-14 3:39
mveRichard MacCutchan19-Sep-14 3:39 
AnswerRe: Resize Control Pin
Dave Kreskowiak19-Sep-14 2:23
mveDave Kreskowiak19-Sep-14 2:23 
AnswerRe: Resize Control Pin
BillWoodruff19-Sep-14 8:36
professionalBillWoodruff19-Sep-14 8:36 
Questionhow to convert pcl to pdf using ghostscript open source dll in C#.net under windows OS Pin
Member 1109382418-Sep-14 20:13
Member 1109382418-Sep-14 20:13 
AnswerRe: how to convert pcl to pdf using ghostscript open source dll in C#.net under windows OS Pin
BillWoodruff18-Sep-14 22:48
professionalBillWoodruff18-Sep-14 22:48 
QuestionRestClient POST Problem Pin
daniel87072118-Sep-14 17:57
daniel87072118-Sep-14 17:57 
Hi,

I had the following code to Post my data to WebApi.

[code]
public EFileInfo UploadFile(string WebApiBaseAddress, string WebApiServiceUrl, WebApiParameters webParams)
{
EFileInfo eFile = null;

RestClient client = new RestClient(WebApiBaseAddress);
RestRequest request = new RestRequest(WebApiServiceUrl, Method.POST);
request.RequestFormat = DataFormat.Json;
request.AddBody(webParams);

IRestResponse response = client.Execute(request);

eFile = new System.Web.Script.Serialization.JavaScriptSerializer().Deserialize<efileinfo>(response.Content);

return eFile;
}
[/code]

And the following is my code to accept the parameter and post the data:

[code]
public EFileInfo PosteFile(WebApiParameters wParams) {
EFileInfo eFileResult = null;
var httpRequest = HttpContext.Current.Request;

try {
eFileResult = resp.Upload_File(AppRootPath, Convert.ToInt32(wParams.Parameters["year"]),
Convert.ToInt32(wParams.Parameters["month"]), wParams.Parameters["location"],
wParams.Parameters["brand"], wParams.Parameters["department"], wParams.Parameters["type"],
wParams.Parameters["generateFrom"], Convert.ToInt32(wParams.Parameters["expiryDuration"]),
wParams.UploadFiles.First());
} catch (InvalidOperationException ex) {
throw new NotImplementedException(ex.Message, new Exception(ex.InnerException.ToString()));
// throw new NotImplementedException(ex.Message, new Exception(ex.InnerException.ToString()));
}
return eFileResult;
[/code]


I am not sure why the parameter always unable to pass it to PosteFile. The process sometimes run smoothly but sometimes it pass NULL value to PosteFile function. I checked the parameters, everything is ok.
AnswerRe: RestClient POST Problem Pin
jschell19-Sep-14 12:19
jschell19-Sep-14 12:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.