コード例 #1
0
 private void RaiseRowDoubleClickEventHander(CHBK2014_N9.Common.Class.RowClickEventArgs e)
 {
     if (this.RowDoubleClick != null)
     {
         this.RowDoubleClick(this, e);
     }
 }
コード例 #2
0
        public object GetCellValue(CHBK2014_N9.Common.Class.RowClickEventArgs e, GridView view)
        {
            GridColumn gridColumn = new GridColumn();

            gridColumn = (e.ColumnIndex == -1 ? view.Columns[e.FieldName] : view.Columns[e.ColumnIndex]);
            return(view.GetRowCellValue(e.RowIndex, gridColumn));
        }
コード例 #3
0
 private void RaiseListKeyDownEventHander(KeyEventArgs key, CHBK2014_N9.Common.Class.RowClickEventArgs e)
 {
     if (this.ListKeyDown != null)
     {
         this.ListKeyDown(this, key, e);
     }
 }
コード例 #4
0
 protected virtual void gbList_KeyDown(object sender, KeyEventArgs e)
 {
     if (!(sender is AdvBandedGridView))
     {
         XtraMessageBox.Show("Object is not AdvBandedGridView");
     }
     else
     {
         AdvBandedGridView advBandedGridView = (AdvBandedGridView)sender;
         CHBK2014_N9.Common.Class.RowClickEventArgs rowClickEventArg = new CHBK2014_N9.Common.Class.RowClickEventArgs((advBandedGridView == null ? -1 : advBandedGridView.FocusedRowHandle), (advBandedGridView.FocusedColumn == null ? -1 : advBandedGridView.FocusedColumn.ColumnHandle), (advBandedGridView.FocusedColumn == null ? "" : advBandedGridView.FocusedColumn.FieldName));
         this.RaiseRowClickEventHander(rowClickEventArg);
         this.RaiseListKeyDownEventHander(e, rowClickEventArg);
         this.ucList_ListKeyDown(sender, e);
         this.m_RowClickEventArgs = rowClickEventArg;
         if (e.KeyCode == Keys.Delete)
         {
             if (this.gbList.RowCount == 0)
             {
                 return;
             }
             this.Delete();
             this.SetMenu(this.m_RowClickEventArgs);
         }
     }
 }
コード例 #5
0
        private void gbList_RowCellClick(object sender, RowCellClickEventArgs e)
        {
            DateTime dateTime;

            CHBK2014_N9.Common.Class.RowClickEventArgs rowClickEventArg = new CHBK2014_N9.Common.Class.RowClickEventArgs(e.RowHandle, e.Column.ColumnHandle);
            this.SetMenu(rowClickEventArg);
            try
            {
                this.toolTip1.HideHint();
                int num = Convert.ToInt32(this.gbList.GetFocusedRowCellValue(this.colStatus).ToString());
                if (num == 0)
                {
                    ToolTipController toolTipController = this.toolTip1;
                    string[]          newLine           = new string[] { "Đang thử việc!", Environment.NewLine, "Từ ngày: ", null, null, null, null };
                    dateTime   = Convert.ToDateTime(this.gbList.GetFocusedRowCellValue(this.colTestFromDate).ToString());
                    newLine[3] = dateTime.ToShortDateString();
                    newLine[4] = Environment.NewLine;
                    newLine[5] = "Đến ngày: ";
                    dateTime   = Convert.ToDateTime(this.gbList.GetFocusedRowCellValue(this.colTestToDate).ToString());
                    newLine[6] = dateTime.ToShortDateString();
                    toolTipController.ShowHint(string.Concat(newLine));
                }
                if (num == 3)
                {
                    ToolTipController toolTipController1 = this.toolTip1;
                    string            str = Environment.NewLine;
                    dateTime = Convert.ToDateTime(this.gbList.GetFocusedRowCellValue(this.colEndDate).ToString());
                    toolTipController1.ShowHint(string.Concat("Đã nghỉ việc!", str, "Từ ngày: ", dateTime.ToShortDateString()));
                }
            }
            catch
            {
            }
        }
コード例 #6
0
 private void gbList_DoubleClick_1(object sender, EventArgs e)
 {
     if (!(sender is AdvBandedGridView))
     {
         XtraMessageBox.Show("Object is not AdvBandedGridView");
     }
     else
     {
         AdvBandedGridView advBandedGridView = (AdvBandedGridView)sender;
         CHBK2014_N9.Common.Class.RowClickEventArgs rowClickEventArg = new CHBK2014_N9.Common.Class.RowClickEventArgs((advBandedGridView == null ? -1 : advBandedGridView.FocusedRowHandle), (advBandedGridView.FocusedColumn == null ? -1 : advBandedGridView.FocusedColumn.ColumnHandle), (advBandedGridView.FocusedColumn == null ? "" : advBandedGridView.FocusedColumn.FieldName));
         this.m_RowClickEventArgs = rowClickEventArg;
         if (this._search)
         {
             this.SetSearch(rowClickEventArg);
         }
         else
         {
             if (this.gbList.RowCount == 0)
             {
                 return;
             }
             this.RaiseRowDoubleClickEventHander(rowClickEventArg);
             this.Change();
         }
     }
 }
コード例 #7
0
ファイル: xucRate.cs プロジェクト: chuxuantinh/CHBK2014-N9
 private void gbList_RowCellClick(object sender, RowCellClickEventArgs e)
 {
     CHBK2014_N9.Common.Class.RowClickEventArgs rowClickEventArg = new CHBK2014_N9.Common.Class.RowClickEventArgs(e.RowHandle, e.Column.ColumnHandle);
     this.ItemSelectd(rowClickEventArg);
     this.SetMenu(rowClickEventArg);
     this.SetSearch(rowClickEventArg);
 }
コード例 #8
0
        public object GetCellValue(CHBK2014_N9.Common.Class.RowClickEventArgs e)
        {
            AdvBandedGridView advBandedGridView = this.gbList;
            GridColumn        gridColumn        = new GridColumn();

            gridColumn = (e.ColumnIndex == -1 ? advBandedGridView.Columns[e.FieldName] : advBandedGridView.Columns[e.ColumnIndex]);
            return(advBandedGridView.GetRowCellValue(e.RowIndex, gridColumn));
        }
コード例 #9
0
        private void SetMenu(CHBK2014_N9.Common.Class.RowClickEventArgs e)
        {
            object rowCellValue = this.gbList.GetRowCellValue(this.gbList.FocusedRowHandle, "EmployeeCode");

            this.DisableMenu(false);
            if (rowCellValue == null)
            {
                this.DisableMenu(true);
            }
        }
コード例 #10
0
        protected virtual void gbList_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            if (e.Button == System.Windows.Forms.MouseButtons.Left)
            {
                this.DoShowMenu(this.gbList.CalcHitInfo(new Point(e.X, e.Y)));
            }
            AdvBandedGridView advBandedGridView = (AdvBandedGridView)sender;

            CHBK2014_N9.Common.Class.RowClickEventArgs rowClickEventArg = new CHBK2014_N9.Common.Class.RowClickEventArgs((advBandedGridView == null ? -1 : advBandedGridView.FocusedRowHandle), (advBandedGridView.FocusedColumn == null ? -1 : advBandedGridView.FocusedColumn.ColumnHandle), (advBandedGridView.FocusedColumn == null ? "" : advBandedGridView.FocusedColumn.FieldName));
            this.m_RowClickEventArgs = rowClickEventArg;
            this.SetMenu(rowClickEventArg);
            this.RaiseRowClickEventHander(rowClickEventArg);
        }
コード例 #11
0
ファイル: xucRate.cs プロジェクト: chuxuantinh/CHBK2014-N9
        protected override void SetMenu(CHBK2014_N9.Common.Class.RowClickEventArgs e)
        {
            object rowCellValue = this.gbList.GetRowCellValue(this.gbList.FocusedRowHandle, "RateCode");

            base.DisableMenu(false);
            if (rowCellValue != null)
            {
                base.SetMenu(e);
            }
            else
            {
                base.DisableMenu(true);
            }
        }
コード例 #12
0
 protected virtual void gbList_Click(object sender, EventArgs e)
 {
     if (!(sender is AdvBandedGridView))
     {
         XtraMessageBox.Show("Object is not AdvBandedGridView");
     }
     else
     {
         AdvBandedGridView advBandedGridView = (AdvBandedGridView)sender;
         CHBK2014_N9.Common.Class.RowClickEventArgs rowClickEventArg = new CHBK2014_N9.Common.Class.RowClickEventArgs((advBandedGridView == null ? -1 : advBandedGridView.FocusedRowHandle), (advBandedGridView.FocusedColumn == null ? -1 : advBandedGridView.FocusedColumn.ColumnHandle), (advBandedGridView.FocusedColumn == null ? "" : advBandedGridView.FocusedColumn.FieldName));
         this.m_RowClickEventArgs = rowClickEventArg;
         this.RaiseRowClickEventHander(rowClickEventArg);
         this.ItemSelectd(rowClickEventArg);
     }
 }
コード例 #13
0
        public void UpdateRow(SYS_USER Item, CHBK2014_N9.Common.Class.RowClickEventArgs e)
        {
            AdvBandedGridView advBandedGridView = this.gbList;
            int rowIndex = e.RowIndex;

            advBandedGridView.SetRowCellValue(rowIndex, "Active", Item.Active);
            advBandedGridView.SetRowCellValue(rowIndex, "UserID", Item.UserID);
            advBandedGridView.SetRowCellValue(rowIndex, "UserName", Item.UserName);
            SYS_GROUP sYSGROUP = new SYS_GROUP();

            sYSGROUP.Get(Item.Group_ID);
            advBandedGridView.SetRowCellValue(rowIndex, "Role_Name", sYSGROUP.Group_Name);
            advBandedGridView.SetRowCellValue(rowIndex, "EmployeeCode", Item.EmployeeCode);
            advBandedGridView.SetRowCellValue(rowIndex, "Description", Item.Description);
            advBandedGridView.SetRowCellValue(rowIndex, "Active", Item.Active);
            advBandedGridView.UpdateCurrentRow();
        }
コード例 #14
0
ファイル: xucRate.cs プロジェクト: chuxuantinh/CHBK2014-N9
 public override void SetSearch(CHBK2014_N9.Common.Class.RowClickEventArgs e)
 {
     if (this._search)
     {
         DIC_RATE dICRATE      = new DIC_RATE();
         object   rowCellValue = this.gbList.GetRowCellValue(this.MRowClickEventArgs.RowIndex, "RateCode");
         if (rowCellValue != null)
         {
             base.SetWaitDialogCaption("Đang kiểm tra dữ liệu....");
             if (!(dICRATE.Get(rowCellValue.ToString()) != "OK"))
             {
                 this.DoHide();
                 this.RaiseItemSelectedEventHander(dICRATE);
             }
             else
             {
                 this.DoHide();
                 XtraMessageBox.Show("Dữ liệu không tồn tại", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             }
         }
     }
 }
コード例 #15
0
 protected virtual void ItemSelectd(CHBK2014_N9.Common.Class.RowClickEventArgs ex)
 {
 }
コード例 #16
0
 public virtual void SetSearch(CHBK2014_N9.Common.Class.RowClickEventArgs e)
 {
 }
コード例 #17
0
 protected virtual void SetMenu(CHBK2014_N9.Common.Class.RowClickEventArgs e)
 {
 }
コード例 #18
0
 protected virtual void UpdateRow(object Item, CHBK2014_N9.Common.Class.RowClickEventArgs e)
 {
 }