Beispiel #1
0
        private void dgv_task_CellValueChanged(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.ColumnIndex == 9)
                {
                    string ls_TheirTableName = dgv_task["TheirTableName", e.RowIndex].Value.ToString();
                    string ls_OurTableName   = dgv_task["OurTableName", e.RowIndex].Value.ToString();
                    string ls_interfaceDesc  = dgv_task["interfaceDesc", e.RowIndex].Value.ToString();
                    string ls_direction      = (dgv_task["direction", e.RowIndex].Value.ToString() == "导入" + Project.DB_Alias ? "0" : "1");

                    if (ls_TheirTableName == "")
                    {
                        return;
                    }
                    FrmFieldTranse fft = new FrmFieldTranse(ls_TheirTableName, ls_OurTableName, ls_interfaceDesc, ls_direction);
                    fft.LoadData();
                    fft.GetRuleSQL(ref fft.gs_TheirSql, ref fft.gs_OurSql, ref fft.gs_GroupSql);
                    dgv_task["TheirSql", e.RowIndex].Value = fft.gs_TheirSql;
                    dgv_task["OurSql", e.RowIndex].Value   = fft.gs_OurSql;
                    dgv_task["GroupSql", e.RowIndex].Value = fft.gs_GroupSql;
                }
            }
            catch { }
        }
Beispiel #2
0
        private void dgv_task_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }
            if ((Project.DB_Type == "exe") || (Project.TheirDB_Type == "exe"))
            {
                return;
            }
            string ls_TheirTableName = dgv_task["TheirTableName", e.RowIndex].Value.ToString();
            string ls_OurTableName   = dgv_task["OurTableName", e.RowIndex].Value.ToString();
            string ls_interfaceDesc  = dgv_task["interfaceDesc", e.RowIndex].Value.ToString();
            string ls_direction      = (dgv_task["direction", e.RowIndex].Value.ToString() == "导入" + Project.DB_Alias ? "0" : "1");

            //if (ls_TheirTableName == "")
            //{
            //    MessageBox.Show("请输入对方表名");
            //    return;
            //}
            FrmFieldTranse fft = new FrmFieldTranse(ls_TheirTableName, ls_OurTableName, ls_interfaceDesc, ls_direction);

            if (fft.ShowDialog() == DialogResult.OK)
            {
                dgv_task["interfaceDesc", e.RowIndex].Value  = fft.gs_interfaceDesc;
                dgv_task["TheirSql", e.RowIndex].Value       = fft.gs_TheirSql;
                dgv_task["OurSql", e.RowIndex].Value         = fft.gs_OurSql;
                dgv_task["GroupSql", e.RowIndex].Value       = fft.gs_GroupSql;
                dgv_task["GroupField", e.RowIndex].Value     = fft.gs_GroupField;
                dgv_task["TheirTableName", e.RowIndex].Value = fft.gs_TheirTableName;
            }
        }