Exemple #1
0
        private void ReqCancelView_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
        {
            decimal dBQty = Convert.ToDecimal(clsStatics.IsNullCheck(ReqCancelView.GetFocusedRowCellValue("HiddenQty"), clsStatics.datatypes.vartypenumeric));
            decimal dCQty = Convert.ToDecimal(clsStatics.IsNullCheck(ReqCancelView.GetFocusedRowCellValue("CancelQty"), clsStatics.datatypes.vartypenumeric));

            if (dCQty > 0)
            {
                if (dBQty != dCQty)
                {
                    MessageBox.Show("Enter Valid Quantity!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    ReqCancelView.SetRowCellValue(ReqCancelView.FocusedRowHandle, "CancelQty", "0.00000");
                    return;
                }
            }
        }
Exemple #2
0
 private void btnRQC_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     dwRegister.Show();
     dwReqCancel.Show();
     dwOptions.Hide();
     radDock1.ActiveWindow = dwReqCancel;
     RequestId             = Convert.ToInt32(ReqListView.GetFocusedRowCellValue("RequestId"));
     dtRQC = RequestEntryBL.GetRQC(RequestId);
     grdReqCancel.DataSource = dtRQC;
     grdReqCancel.ForceInitialize();
     ReqCancelView.PopulateColumns();
     ReqCancelView.Columns["RequestId"].Visible      = false;
     ReqCancelView.Columns["RequestTransId"].Visible = false;
     ReqCancelView.Columns["UnitId"].Visible         = false;
     ReqCancelView.Columns["ResourceId"].Visible     = false;
     ReqCancelView.Columns["HiddenQty"].Visible      = false;
     DevExpress.XtraEditors.Repository.RepositoryItemTextEdit txtCQty = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
     ReqCancelView.Columns["CancelQty"].ColumnEdit = txtCQty;
     txtCQty.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
     txtCQty.Mask.EditMask = "#########################.#####";
 }