Skip to content

Instantly share code, notes, and snippets.

@KarateJB
Created August 15, 2016 03:44
Show Gist options
  • Save KarateJB/07d940e4c9274328dafecb5f638d9ecc to your computer and use it in GitHub Desktop.
Save KarateJB/07d940e4c9274328dafecb5f638d9ecc to your computer and use it in GitHub Desktop.
[WebApi] Get uri parameters
//Get the url parameters
NameValueCollection nvc = HttpUtility.ParseQueryString(Request.RequestUri.Query);
var qcBsTypeId = nvc["bsType"] ?? String.Empty; //查詢條件 : 作業類別
var qcCustId = nvc["customer"] ?? String.Empty; //查詢條件 : 客戶
var qcScheduleDateFrom = nvc["scheduleDateFrom"] ?? String.Empty; //查詢條件 : 運送日期(From)
var qcScheduleDateTo = nvc["scheduleDateTo"] ?? String.Empty; //查詢條件 : 運送日期(To)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment