예제 #1
0
파일: Form6.cs 프로젝트: EdgarEDT/myitoppsp
        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();
        }
예제 #2
0
        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;
        }
예제 #3
0
 public Form6Details(PSP_WGBCReports wgbcReport)
 {
     InitializeComponent();
     _wgbcReport = wgbcReport;
 }