Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
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 
Questionget a table from a website and save it into a db Pin
Mohammad Kamali(mo_kml)18-Sep-14 11:02
Mohammad Kamali(mo_kml)18-Sep-14 11:02 
AnswerRe: get a table from a website and save it into a db Pin
Dave Kreskowiak18-Sep-14 14:27
mveDave Kreskowiak18-Sep-14 14:27 
AnswerRe: get a table from a website and save it into a db Pin
Sibeesh KV26-Sep-14 0:24
professionalSibeesh KV26-Sep-14 0:24 
Questionhow to detect that user touch the panel left or right edge WinForm Pin
Tridip Bhattacharjee18-Sep-14 4:56
professionalTridip Bhattacharjee18-Sep-14 4:56 
AnswerRe: how to detect that user touch the panel left or right edge WinForm Pin
Eddy Vluggen18-Sep-14 5:27
professionalEddy Vluggen18-Sep-14 5:27 
AnswerRe: how to detect that user touch the panel left or right edge WinForm Pin
BillWoodruff18-Sep-14 6:10
professionalBillWoodruff18-Sep-14 6:10 
GeneralRe: how to detect that user touch the panel left or right edge WinForm Pin
Tridip Bhattacharjee18-Sep-14 21:46
professionalTridip Bhattacharjee18-Sep-14 21:46 
GeneralRe: how to detect that user touch the panel left or right edge WinForm Pin
BillWoodruff18-Sep-14 22:23
professionalBillWoodruff18-Sep-14 22:23 
QuestionProgrammatically Scrolling is not working C# WinForm Pin
Tridip Bhattacharjee18-Sep-14 4:41
professionalTridip Bhattacharjee18-Sep-14 4:41 
AnswerRe: Programmatically Scrolling is not working C# WinForm Pin
Dave Kreskowiak18-Sep-14 5:46
mveDave Kreskowiak18-Sep-14 5:46 
AnswerRe: Programmatically Scrolling is not working C# WinForm Pin
BillWoodruff18-Sep-14 7:05
professionalBillWoodruff18-Sep-14 7:05 
GeneralRe: Programmatically Scrolling is not working C# WinForm Pin
Tridip Bhattacharjee18-Sep-14 21:43
professionalTridip Bhattacharjee18-Sep-14 21:43 
GeneralRe: Programmatically Scrolling is not working C# WinForm Pin
BillWoodruff18-Sep-14 22:38
professionalBillWoodruff18-Sep-14 22:38 
GeneralRe: Programmatically Scrolling is not working C# WinForm Pin
Tridip Bhattacharjee19-Sep-14 3:34
professionalTridip Bhattacharjee19-Sep-14 3:34 
GeneralRe: Programmatically Scrolling is not working C# WinForm Pin
BillWoodruff19-Sep-14 21:36
professionalBillWoodruff19-Sep-14 21:36 
QuestionHow do i delete my visual studio online project Pin
J.J.S_;)18-Sep-14 0:51
J.J.S_;)18-Sep-14 0:51 

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.