private void createCaseButton_Click(object sender, EventArgs e) { if (ValidateForm()) { CaseTypeModel sendCaseTypeObject = ((CaseTypeModel)caseTypeValue.SelectedItem); CaseModel model = new CaseModel(caseNameValue.Text, startDateValue.Text, endDateValue.Text, startTimeValue.Text, sendCaseTypeObject); GlobalConfig.Connection.CreateCase(model); caseNameValue.Text = ""; MessageBox.Show("Case Created."); // TODO - Rest of case contents } else { MessageBox.Show("This form is invalid, please try again."); } }
public JsonResult getCaseTypes() { return(Json(new { Response = CaseTypeModel.getAll() }, JsonRequestBehavior.AllowGet)); }