Beispiel #1
0
        void barBtnInvalid_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var et = gcUnFinish.GetFocusedDataSource<T_ERP_OrderProced>();
            if (et == null) return;

            var vw = new InvRemarkView();

            if (vw.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
                et.IsInvalid = true;
                et.InvalidUser = this.CurUser;
                et.InvalidTime = TimeSync.Default.CurrentSyncTime;
                et.Reserved2 = vw.InvRmrk;

                if (SerNoCaller.Calr_OrderProced.Edt(et).IsOK) {
                    var trds = gcInvalid.GetDataSource<T_ERP_OrderProced>();
                    trds = trds ?? new List<T_ERP_OrderProced>();
                    trds.Insert(0, et);

                    gcUnFinish.RemoveSelected();
                }
            }
        }
Beispiel #2
0
        void barBtnInvalid_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var et = gcTrdPrd.GetFocusedDataSource<T_ERP_TradePrd>();
            if (et == null) return;

            var vw = new InvRemarkView();

            if (vw.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
                var rd = SerNoCaller.Calr_TradePrd.ExecSql("exec P_FAS_InvalidTradePrd @0,@1,@2", et.PrdNo, this.CurUser, vw.InvRmrk);
                if (rd.IsOK) {
                    barBtnRefresh_ItemClick(null, null);
                }
            }
        }