private void OpenDetail() { if (gvPrjamountRpt.FocusedRowHandle < 0) { return; } PrjAmountRpt rpt = gvPrjamountRpt.GetFocusedRow() as PrjAmountRpt; if (rpt != null && !String.IsNullOrEmpty(rpt.PrjamountNo)) { DoWorkRun("读取数据中,请稍候......", "读取数据", () => { PrjAmountRpt result = new PrjAmountRpt(); result = client.Get(rpt.PrjamountNo); return(result); }, (result, ex) => { if (ex == null && result != null) { MeteringRptDetailControl form = new MeteringRptDetailControl(); form.DataSource = result as PrjAmountRpt; AppForm.CurrentForm.ChangeForm(String.Format("项目:{0}-第{1}期报表", ProjectName, (result as PrjAmountRpt).Periods ?? 0), form); } }); } }
private void LoadData() { DoWorkRun("读取数据中,请稍候......", "读取数据", () => { PrjAmountRpt result = client.Get(DataSource.PrjamountNo); return(result); }, (result, ex) => { if (ex == null && result != null) { DataSource = result as PrjAmountRpt; } }); }