|
前端页面:
F.Panel().ShowBorder(false).ShowHeader(false).ID("panelTop").Layout(LayoutType.HBox).Items(
F.DropDownList().ID("PointSelect").DataTextField("Value").DataValueField("Key").Width(120).DataSource(ViewBag.ddlPoint),
F.DropDownList().ID("Record").Required(true).DataTextField("Value").DataValueField("Key").AutoSelectFirstItem(false).EmptyText("点击选择记载项")
.OnSelectedIndexChanged(Url.Action("DoSearchPaging"), "DataEnterGrid", new Parameter("Layout_detailId", "F.ui.Layout_detailId.getText().replace(/<[^>]+>/g, '')"),new Parameter("recordId", "F.ui.Record.getValue()"))
.Width(150).MarginLeft(5).DataSource(ViewBag.recordName),
F.Form().ID("diffInputForm").Width(150).MarginLeft(5).Layout(LayoutType.Fit).ShowBorder(false).ShowHeader(false).Items(ViewBag.DiffInput),
Controller:
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult DoSearchPaging(FormCollection values, long? Layout_detailId, long? recordId)
{
DoPageRefresh(values, Layout_detailId, recordId);
return UIHelper.Result();
}
public void DoPageRefresh(FormCollection values, long? Layout_detailId, long? recordId)
{
Pager pagerDatas = new Pager(values.GetFineUIGridPageIndex("DataEnterGrid") + 1, AppSettingsUtility.DefaultGridPageSize);
var datasDatas = bll.GetListByPager<R_recordvalueEntity>(pagerDatas, a => a.RecordId == recordId && a.LayoutDetailId == Layout_detailId, PagerSortDirection.ASC, w => w.Id)
.Select(b => new { b.Id, b.Point, b.Value, b.RecordId, b.EnterDate, b.Images, b.Comments }).ToList();
List<FormInfoMode2> Form2 = new List<FormInfoMode2>();
for (var i = 0; i < datasDatas.Count(); i++)
{
FormInfoMode2 Form = new FormInfoMode2();
Form.Id = datasDatas.Id;
Form.Point = datasDatas.Point;
Form.Value = datasDatas.Value;
Form.RecordId = datasDatas.RecordId;
Form.EnterDate = datasDatas.EnterDate;
Form.Images = datasDatas.Images;
Form.Comments = datasDatas.Comments;
Form.RecordName = bll.GetEntity<R_recordEntity>(w => w.id == datasDatas.RecordId).record_name;
Form2.Add(Form);
}
var gridDatas = UIHelper.Grid("DataEnterGrid");
gridDatas.RecordCount(pagerDatas.RecordCount);
gridDatas.DataSource(Form2, values.GetFineUIGridFields("DataEnterGrid"));
//根据记载项类型添加不同的数据录入框
ViewBag.DiffInput = ChooseDiffTypeInput(recordId);
}
怎么才能给返回去?
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|