示例#1
0
        public override int Add()
        {
            FormCompany form = new FormCompany();

            form.ShowDialog();

            return(1);
        }
示例#2
0
        private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.ColumnIndex < 0 || e.RowIndex < 0)
            {
                return;
            }

            int companyid = 0;

            if (dataGridView1.Rows[e.RowIndex].Cells["companyid"].Value != null)
            {
                int.TryParse(dataGridView1.Rows[e.RowIndex].Cells["companyid"].Value.ToString(), out companyid);
            }

            FormCompany form = new FormCompany(companyid);

            form.MenuCode = "M005";
            form.ShowDialog();
        }
示例#3
0
        private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.ColumnIndex < 0 || e.RowIndex < 0)
            {
                return;
            }

            string code = string.Empty;

            if (dataGridView1.Rows[e.RowIndex].Cells["code"].Value == null)
            {
                return;
            }
            code = dataGridView1.Rows[e.RowIndex].Cells["code"].Value.ToString();
            FormCompany form = new FormCompany(code);

            form.MenuCode = "M005";
            form.ShowDialog();
        }