Practice C#.NET and SQL SERVER with Accounting System Project: FULL Source Code C# and Database - Advanced Level by Johnson Jack & Johnson Jack

Practice C#.NET and SQL SERVER with Accounting System Project: FULL Source Code C# and Database - Advanced Level by Johnson Jack & Johnson Jack

Author:Johnson, Jack & Johnson, Jack [Johnson, Jack]
Language: eng
Format: epub
Published: 2020-08-08T16:00:00+00:00


private void dataGridView_Click(object sender, EventArgs e)

{

if (ASParameters.showToolTipOnDataGrid)

{

string dataToShow = CreateToolTipText();

this.toolTip1.SetToolTip(dataGridView, dataToShow);

this.toolTip1.ToolTipTitle = "Suppliers";

}

}

string CreateToolTipText()

{

string toolTipText = "";

DataGridViewRow row = dataGridView.CurrentRow;

toolTipText = "SupplierId: " + row.Cells["SupplierId"].Value.ToString();

toolTipText += "\rDueDate: " + row.Cells["DueDate"].Value.ToString();

toolTipText += "\rSupplierName: " + row.Cells["CompanyNameInVietnamese"].Value.ToString();

return toolTipText;

}

private void btnEdit_Click(object sender, EventArgs e)

{

btnPrint.Enabled = true;

switch (btnEdit.Text)

{

case "&Edit":

DataGridViewRow dataGridViewRow = dataGridView.CurrentRow;

if (dataGridViewRow != null)

{

txtId.Enabled = false;

lblProvinces.Visible = true;

lblType.Visible = true;

cboProvinces.Visible = true;

cboType.Visible = true;

btnEdit.Text = "&Back";

btnAddAndSave.Text = "&Update";

lblHeader.Text = "Edit Supplier";

dataGridView.Visible = false;

panelHeader.Visible = false;

panelDetails.Visible = true;

string itemId = Convert.ToString(dataGridViewRow.Cells["SupplierId"].Value);

EditSupplier(itemId);

}

break;

case "&Back":

lblProvinces.Visible = false;

lblType.Visible = false;

cboProvinces.Visible = false;

cboType.Visible = false;

btnEdit.Text = "&Edit";

btnAddAndSave.Text = "&Add New";

lblHeader.Text = "List of Suppliers";

lblWarning.Text = "Ready...";

dataGridView.Visible = true;

lblRecordText.Text = "Suppliers found: ";

lblRecords.Text = dataGridView.Rows.Count.ToString() ;

panelHeader.Visible = true;

panelDetails.Visible = false;



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.