Esempio n. 1
0
        private void dataGridViewProduct_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            int rowIndex  = e.RowIndex;
            int projectId = int.Parse(dataGridViewProduct.Rows[rowIndex].Cells[0].Value.ToString());
            ProductDataLogic projectDataLogic = new ProductDataLogic();
            //string projectName, projectDescription;
            //bool isActive, isSystemGenerated;
            bool result = projectDataLogic.GetProjectInfo(projectId, out projectName, out projectDescription, out isActive, out isSystemGenerated);

            if (result == true)
            {
                ProductAddForm projectAddForm = new ProductAddForm()
                {
                    MdiParent = this.Parent.FindForm()
                };
                projectAddForm.projectName        = projectName;
                projectAddForm.projectDescription = projectDescription;
                projectAddForm.isActive           = isActive;
                projectAddForm.isSystemGenerated  = isSystemGenerated;
                projectAddForm.projectId          = projectId;
                this.Hide();
                projectAddForm.Show();
            }
            else
            {
                MessageBox.Show("No Valid Information Found!", "Error!");
            }
        }
Esempio n. 2
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            ProductAddForm projectAddForm = new ProductAddForm();

            this.Hide();
            projectAddForm.Show();
        }