コード例 #1
0
 private void btnOk_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     ReqCancelView.FocusedRowHandle = ReqCancelView.FocusedRowHandle + 1;
     RequestEntryBL.RQCTransaction(dtRQC);
     grdReqCancel.DataSource = null;
     grdReqCancel.RefreshDataSource();
 }
コード例 #2
0
 private void frmRequestRegister_Load(object sender, EventArgs e)
 {
     clsStatics.SetMyGraphics();
     dtpFrmDate.EditValue = RequestEntryBL.GetMinDate();
     dtpTodate.EditValue  = DateTime.Now;
     dwOptions.Hide();
     dwReqCancel.Hide();
     dwRegister.Show();
     PopulateGrid();
 }
コード例 #3
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 = "#########################.#####";
 }
コード例 #4
0
        private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Request-Delete") == false)
            {
                MessageBox.Show("No Rights to Delete Request", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            int RequestId = Convert.ToInt32(clsStatics.IsNullCheck(ReqListView.GetFocusedRowCellValue("RequestId").ToString(), clsStatics.datatypes.vartypenumeric));
            int argCCId   = Convert.ToInt32(clsStatics.IsNullCheck(ReqListView.GetFocusedRowCellValue("CostCentreId"), clsStatics.datatypes.vartypenumeric));

            if (RequestEntryBL.ValidDelete(RequestId) == true)
            {
                if (MessageBox.Show("Are you sure want to Delete this Register", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString() == "Yes")
                {
                    RequestEntryBL.DeleteRegister(RequestId, argCCId);
                    ReqListView.DeleteRow(ReqListView.FocusedRowHandle);
                }
            }
            else
            {
                MessageBox.Show("Already Used. Do Not Delete!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
        }