Esempio n. 1
0
        private void DbGrid_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                var senderGrid = (DataGridView)sender;

                DbGrid.Tag = e.RowIndex;

                if (senderGrid.Columns[e.ColumnIndex] is DataGridViewLinkColumn && e.RowIndex >= 0)
                {
                    if (senderGrid.Columns[e.ColumnIndex].Name == "MandateNo")
                    {
                        if (DbGrid["MainAction", e.RowIndex].Value.ToString() == "Main")
                        {
                            FrmPayment ChildForm = new FrmPayment(DbGrid[0, e.RowIndex].Value.ToString(), Convert.ToInt16(DbGrid["dIndex", e.RowIndex].Value));
                            ChildForm.cmdSave.Enabled = false;
                            ChildForm.ShowDialog();
                        }
                        else
                        {
                            FrmPayDeduction ChildForm1 = new FrmPayDeduction(DbGrid["MainAction", e.RowIndex].Value.ToString(), DbGrid[0, e.RowIndex].Value.ToString(), Convert.ToInt16(DbGrid["dIndex", e.RowIndex].Value));
                            ChildForm1.cmdSave.Enabled = false;
                            ChildForm1.ShowDialog();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, MyModules.strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        private void btnStamp_Click(object sender, EventArgs e)
        {
            if (MyModules.GetUserAccessDetails("Payments") == false)
            {
                return;
            }
            FrmPayDeduction childform = new FrmPayDeduction("Stamp", "", 0);

            childform.ShowDialog();
        }
Esempio n. 3
0
        private void lvList_DoubleClick(object sender, EventArgs e)
        {
            try {
                ListView.SelectedListViewItemCollection SLV = lvList.SelectedItems;
                foreach (ListViewItem item in SLV)
                {
                    if (item.SubItems[5].Text == "Main")
                    {
                        FrmPayment ChildForm = new FrmPayment(item.Text, -1);
                        if (Convert.ToBoolean(item.SubItems[4].Text) == true)
                        {
                            ChildForm.cmdSave.Enabled = false;
                        }
                        else
                        {
                            ChildForm.cmdSave.Enabled = true;
                        }

                        ChildForm.ShowDialog();
                    }
                    else
                    {
                        FrmPayDeduction ChildForm1 = new FrmPayDeduction(item.SubItems[5].Text, item.Text, -1);

                        if (Convert.ToBoolean(item.SubItems[4].Text) == true)
                        {
                            ChildForm1.cmdSave.Enabled = false;
                        }
                        else
                        {
                            ChildForm1.cmdSave.Enabled = true;
                        }

                        ChildForm1.ShowDialog();
                    }
                    listOfMandates();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, MyModules.strApptitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }