Exemple #1
0
        private void buttonMaterialAdd_Click(object sender, EventArgs e)
        {
            FormMaterialDetail formMaterialDetail = new FormMaterialDetail();

            formMaterialDetail.ShowDialog();

            refreshDataViewMaterial();
        }
Exemple #2
0
        private void buttonMaterialEdit_Click(object sender, EventArgs e)
        {
            if (dataViewMaterial.SelectedRows.Count > 0)
            {
                int materialID = Convert.ToInt16(dataViewMaterial.SelectedRows[0].Cells[0].Value);
                FormMaterialDetail formMaterialDetail = new FormMaterialDetail(Material.GetMaterial(materialID), "edit");
                formMaterialDetail.ShowDialog();

                refreshDataViewMaterial();
            }
        }
        private void dataViewMaterial_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataViewMaterial.SelectedRows.Count > 0)
            {
                int materialID = Convert.ToInt16(dataViewMaterial.SelectedRows[0].Cells[0].Value);
                FormMaterialDetail formMaterialDetail = new FormMaterialDetail(Material.GetMaterial(materialID), "edit");
                formMaterialDetail.ShowDialog();

                refreshDataViewMaterial();
            }
        }
        private void buttonMaterialAdd_Click(object sender, EventArgs e)
        {
            FormMaterialDetail formMaterialDetail = new FormMaterialDetail();
            formMaterialDetail.ShowDialog();

            refreshDataViewMaterial();
        }