예제 #1
0
        protected override void Add()
        {
            xfmUnitAdd _xfmUnitAdd = new xfmUnitAdd(Actions.Add);

            _xfmUnitAdd.Added += new xfmUnitAdd.AddedEventHander(this.frm_Added);
            _xfmUnitAdd.ShowDialog();
        }
예제 #2
0
 private void cbo_ButtonClick(object sender, ButtonPressedEventArgs e)
 {
     if (e.Button.Kind == ButtonPredefines.Plus)
     {
         string name = (sender as ComboBoxEdit).Name;
         if (name != null)
         {
             if (name != "cboUnit")
             {
                 goto Label0;
             }
             xfmUnitAdd _xfmUnitAdd = new xfmUnitAdd(Actions.Add);
             _xfmUnitAdd.Added += new xfmUnitAdd.AddedEventHander((object s, DIC_UNIT i) => this.AddComboboxEdit(this.cboUnit, i.UnitName));
             _xfmUnitAdd.ShowDialog();
         }
         Label0 :;
     }
 }
예제 #3
0
        public override void Change()
        {
            DIC_UNIT dICUNIT   = new DIC_UNIT();
            object   cellValue = base.GetCellValue(this.m_RowClickEventArgs.RowIndex, "UnitCode");

            if (cellValue != null)
            {
                base.SetWaitDialogCaption("Đang kiểm tra dữ liệu....");
                if (!(dICUNIT.Get(cellValue.ToString()) != "OK"))
                {
                    this.DoHide();
                    xfmUnitAdd _xfmUnitAdd = new xfmUnitAdd(Actions.Update, dICUNIT);
                    _xfmUnitAdd.Updated += new xfmUnitAdd.UpdatedEventHander(this.frm_Updated);
                    _xfmUnitAdd.Added   += new xfmUnitAdd.AddedEventHander(this.frm_Added);
                    _xfmUnitAdd.ShowDialog();
                }
                else
                {
                    this.DoHide();
                    XtraMessageBox.Show("Dữ liệu không tồn tại", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
        }