예제 #1
0
파일: MainView.cs 프로젝트: ZixiangBoy/FAS
 void barBtnEdt_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     var et = gridView1.GetFocusedDataSource<UltraDbEntity.T_ERP_Procedure>();
     if (null == et) return;
     var vw = new EdtView();
     //vw.Lgc = Lgc;
     vw.EditMode = Business.Core.Define.EnViewEditMode.Edit;
     vw.Entity = et;
     InitView(vw);
     if (vw.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         gridControlEx1.RefreshDataSource();
     }
 }
예제 #2
0
파일: MainView.cs 프로젝트: ZixiangBoy/FAS
 void barBtnNew_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     var vw = new EdtView();
     //vw.Lgc = Lgc;
     vw.EditMode = Business.Core.Define.EnViewEditMode.New;
     InitView(vw);
     if (vw.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         var et = vw.Entity;
         if (null != et)
         {
             var d = gridControlEx1.GetDataSource<UltraDbEntity.T_ERP_Procedure>();
             d = d ?? new List<UltraDbEntity.T_ERP_Procedure>();
             d.Insert(0, et);
             gridControlEx1.DataSource = d;
             gridControlEx1.RefreshDataSource();
         }
     }
 }