static void DetailProcessCustomBinding(int userId, ReportAlert_ParamModel param, GridViewModel viewModel) { viewModel.ProcessCustomBinding( new GridViewCustomBindingGetDataRowCountHandler(args => { ReportAlertDetail__List_Model.GetDataRowCount(args, userId, param); }), new GridViewCustomBindingGetDataHandler(args => { ReportAlertDetail__List_Model.GetData(args, userId, param); }) ); }
public static ReportAlert_ParamModel GetParam(int Alert_Id) { var param = new ReportAlert_ParamModel(); var tm_Alert = DbProvider.dbApp.SingleOrDefault <Tm_Alert>((Object)Alert_Id); if (tm_Alert != null) { param.Code = Alert_Id.ToString(); param.Name = tm_Alert.AlertName; param.Sql = tm_Alert.Sql; } else { param.Code = Alert_Id.ToString(); param.Name = ""; param.Sql = ""; } return(param); }