Example #1
0
        private void btnAddTextMap_Click(object sender, EventArgs e)
        {
            TmTextMap ttm = new TmTextMap();

            ttm.PjlJobName = "";
            ttm.TmString   = "";
            ttm.ShowDialog();
            if (ttm.ReturnOk)
            {
                if ((ttm.PjlJobName != "") && (ttm.TmString != ""))
                {
                    string[] strRow = { ttm.PjlJobName, ttm.TmString };
                    dgvPjlToTmMap.Rows.Add(strRow);
                }
            }
        }
Example #2
0
 private void btnEditTextMap_Click(object sender, EventArgs e)
 {
     if (dgvPjlToTmMap.SelectedRows.Count > 0)
     {
         string Pjl, TmText;
         Pjl    = dgvPjlToTmMap.SelectedRows[0].Cells[0].Value.ToString();
         TmText = dgvPjlToTmMap.SelectedRows[0].Cells[1].Value.ToString();
         TmTextMap ttm = new TmTextMap();
         ttm.PjlJobName = Pjl;
         ttm.TmString   = TmText;
         ttm.ShowDialog();
         if (ttm.ReturnOk)
         {
             if ((ttm.PjlJobName != "") && (ttm.TmString != ""))
             {
                 dgvPjlToTmMap.SelectedRows[0].Cells[0].Value = ttm.PjlJobName;
                 dgvPjlToTmMap.SelectedRows[0].Cells[1].Value = ttm.TmString;
             }
         }
     }
 }