예제 #1
0
        //修改
        void _barbtnUpdate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            if (gvData.FocusedRowHandle < 0)
            {
                ControlsHelper.ShowWarningMessage("提醒", "请点击修改的目的地");
            }
            else
            {
                CoDestination destination = (CoDestination)gvData.GetRow(gvData.FocusedRowHandle);

                FrmDestinationEdit frm = new FrmDestinationEdit(DBOperateType.Update, destination);
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    BindList();
                    ControlsHelper.ShowAlertMessage(this.ParentForm, "修改", "修改成功");
                }
            }
            this.Cursor = Cursors.Default;
        }
예제 #2
0
 //新增
 void _barbtnInsert_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     FrmDestinationEdit frm = new FrmDestinationEdit(DBOperateType.Insert, null);
     if (frm.ShowDialog() == DialogResult.OK)
     {
         BindList();
         ControlsHelper.ShowAlertMessage(this.ParentForm, "新增", "新增成功");
     }
     this.Cursor = Cursors.Default;
 }