예제 #1
0
        private void btnDel_Click(object sender, EventArgs e)
        {
            ClearMessage();
            if (SessionParameters.UserRole == Common.UserRole.Admin)
            {
                STATUS_BAR_STATUS_MESSAGE.Text = MessageManager.GetMessage("13");
                return;
            }

            if (!_isSelectedForUpdate)
            {
                STATUS_BAR_STATUS_MESSAGE.Text = MessageManager.GetMessage("14");
                return;
            }

            if (SessionParameters.UserID != _expenseByUserID)
            {
                STATUS_BAR_STATUS_MESSAGE.Text = MessageManager.GetMessage("13");
                return;
            }


            if (MessageManager.DisplayMessage("15", new string[] { iHealthAccount.Configurations.ApplicationConfiguration.ExpenseCCY, GRID_VIEW_EXPENSE_DETAILS.SelectedRows[0].Cells["ProcedureAmount"].Value.ToString(), GRID_VIEW_EXPENSE_DETAILS.SelectedRows[0].Cells["Item"].Value.ToString() }, MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                Logger.WriteTrace("ProcedureMaster [Delete Expense]", "User : "******"Expense Id : " + procId);
                proc.DeleteProcedures(procId);
                DisplayDataInGrid();
                ClearFunction();
            }
        }