//public NewPrescriptionsForm(int patientID, ContosoMedicalDataClassesDataContext db) //{ // InitializeComponent(); // // Store the patient ID. // _patientID = patientID; // Text = "New Prescriptions for PatientID " + patientID; // // Store the typed DataContext object. // _db = db; //} public NewPrescriptionsForm(int patientID, ModelHttpClient client) { InitializeComponent(); // Store the patient ID. _patientID = patientID; Text = "New Prescriptions for PatientID " + patientID; // Store the ModelHttpClient. _client = client; }
private ModelHttpClient _client; //create ModelhttpClient instance protected void Page_Load(object sender, EventArgs e) { _client = new ModelHttpClient(Settings.ServicesBaseUri); //initialize _client lblMessage.CssClass = "highlight"; DisplayReviews(); if (Request.QueryString["Load"] != null) { lblMessage.Visible = true; } }
public MainForm() { InitializeComponent(); _client = new ModelHttpClient(Settings.ServicesBaseUri, AuthenticationManager.Instance.ServiceAccessToken); }