public void DownloadConsumbleTypes() { new Thread(() => { ConsumblesTypesCore.GetConsumbleTypes(); UpdateDataGridView(); }).Start(); }
private void DataGridViewConsumbleTypes_CellValueChanged(object sender, DataGridViewCellEventArgs e) { if (updateFlag) { DataGridViewCellCollection collection = dataGridViewConsumbleTypes.Rows[e.RowIndex].Cells; ConsumblesTypesCore.EditConsumbleType(collection[0].Value.ToString(), collection[1].Value.ToString(), collection[2].Value.ToString() == GeneralConstants.YES ? "1" : "0"); dataGridViewConsumbleTypes.CellValueChanged -= DataGridViewConsumbleTypes_CellValueChanged; updateFlag = false; selectColumn = e.ColumnIndex; selectedRow = e.RowIndex; DownloadConsumbleTypes(); } }
private void buttonOK_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(textBoxName.Text)) { ErrorsViewWrapper.ShowError(ErrorTexts.ENTER_NAME); } else { ConsumblesTypesCore.AddConsumbleType(textBoxName.Text); ConsumbleTypeForm.instance.DownloadConsumbleTypes(); this.Close(); } }
public void DownloadConsumbleTypes() { ConsumblesTypesCore.GetConsumbleTypes(); }