public ActionResult CreateContractWithClinics(vwCreateContractWithClinic model, string[] selectedClinics) { if (selectedClinics != null) { foreach (var item in selectedClinics) { db.AddClinicToContract(model.ContractItem.ContractID, int.Parse(item)); } } return(RedirectToAction("CreateContractWithMBAnalysis", new { id = model.ContractItem.ContractID })); }
public ActionResult CreateContractWithClinics(int id) { Contract new_c = new Contract(); new_c = db.GetContract(id); vwCreateContractWithClinic obj = new vwCreateContractWithClinic(); obj.ContractItem = new_c; obj.ContractClinics = dbm.vw_ClinicList; return(View(obj)); }