private void Form6_Load(object sender, EventArgs e) { HideToolBarButton(); PSP_WGBCReports report = new PSP_WGBCReports(); IList listReports = Common.Services.BaseService.GetList("SelectPSP_WGBCReportsList", report); dataTable = Itop.Common.DataConverter.ToDataTable(listReports, typeof(PSP_WGBCReports)); gridView1.BeginUpdate(); gridControl1.DataSource = dataTable; gridView1.Columns["ID"].Visible = false; gridView1.Columns["ID"].OptionsColumn.ShowInCustomizationForm = false; gridView1.Columns["Title"].Caption = "标题"; gridView1.EndUpdate(); }
private void simpleButton1_Click(object sender, EventArgs e) { if(textEdit1.Text == string.Empty) { MsgBox.Show("��������⣡"); return; } if(IsEdit) { } else { _wgbcReport = new PSP_WGBCReports(); } _wgbcReport.Title = textEdit1.Text; if (IsEdit) { try { Common.Services.BaseService.Update<PSP_WGBCReports>(_wgbcReport); } catch { MsgBox.Show("�ij����"); return; } } else { try { _wgbcReport.ID = (int)Common.Services.BaseService.Create<PSP_WGBCReports>(_wgbcReport); } catch { MsgBox.Show("�½������"); return; } } DialogResult = DialogResult.OK; }
public Form6Details(PSP_WGBCReports wgbcReport) { InitializeComponent(); _wgbcReport = wgbcReport; }