public int Submit(FormStore store,int userId) { Dictionary<string, object> labelDataList = store.label_data_list.ToDictionary(k => k.label_name_chs, v => v.label_value); var variables = _labelService.GetLabelList(store.form_id); foreach (var variable in variables) { if(!(variable is ControlLabel)) { var labelData = new LabelData() { label_id = variable.label_id, label_name_chs = variable.label_name_chs, label_value = variable.GetValue(r => labelDataList.GetOrDefault(r, "")) }; store.label_data_list.Add(labelData); } } return _formStoreService.AddFormStore(store, userId); }
public IHttpActionResult Submit(FormStore store) { var result = _StoreService.AddFormStore(store, 0); return Json(new OkResponse(result)); }