Example #1
0
        private void toolStripButtonMod_Click(object sender, EventArgs e)
        {
            if (dgvMain.CurrentRow != null)
            {
                int OnCreditID = Convert.ToInt32(dgvMain.CurrentRow.Cells["ColumnOnCreditID"].Value);

                FormOnCreditItem dlg = new FormOnCreditItem();

                dlg.m_OnCreditItem.OnCreditID = OnCreditID;

                dlg.m_OnCreditItem.ClientName = dgvMain.CurrentRow.Cells["ColumnClientName"].Value.ToString();
                dlg.m_OnCreditItem.Address    = dgvMain.CurrentRow.Cells["ColumnAddress"].Value.ToString();
                dlg.m_OnCreditItem.Company    = dgvMain.CurrentRow.Cells["ColumnCompany"].Value.ToString();
                dlg.m_OnCreditItem.PostCode   = dgvMain.CurrentRow.Cells["ColumnPostCode"].Value.ToString();

                dlg.m_OnCreditItem.Phone       = dgvMain.CurrentRow.Cells["ColumnPhone"].Value.ToString();
                dlg.m_OnCreditItem.MobilePhone = dgvMain.CurrentRow.Cells["ColumnMobilePhone"].Value.ToString();
                try
                {
                    dlg.m_OnCreditItem.OnCreditLimit = Convert.ToDouble(dgvMain.CurrentRow.Cells["ColumnOnCreditLimit"].Value);
                    dlg.m_OnCreditItem.OnCreditSum   = Convert.ToDouble(dgvMain.CurrentRow.Cells["ColumnOnCreditSum"].Value);
                }
                catch
                {
                }
                dlg.m_OnCreditItem.Remark = dgvMain.CurrentRow.Cells["ColumnRemark"].Value.ToString();

                dlg.ShowDialog();
            }
        }
Example #2
0
        private void toolStripButtonAdd_Click(object sender, EventArgs e)
        {
            FormOnCreditItem dlg = new FormOnCreditItem();

            dlg.ShowDialog();
        }