private void buttonCode_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; SCO.writeNatives = checkBoxWriteHashes.Checked; frmCode cd = new frmCode(); if (radioButtonOld.Checked) { SCO.nattype = "Old"; cd.toolStripComboBoxNatType.Text = radioButtonOld.Text; } if (radioButtonNew.Checked) { SCO.nattype = "New"; cd.toolStripComboBoxNatType.Text = radioButtonNew.Text; } if (radioButtonAdvanced.Checked) { cd.syntaxBoxControl.Visible = true; cd.richTextBox.Visible = false; } if (radioButtonBasic.Checked) { cd.syntaxBoxControl.Visible = false; cd.richTextBox.Visible = true; } cd.ShowDialog(); Cursor.Current = Cursors.Default; }
private void txtserial_no_Properties_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { if (mState == "NEW" || mState == "EDIT") { using (frmCode ofrmFind = new frmCode()) { ofrmFind.ShowDialog(); if (ofrmFind.strCityCode != "") { txtserial_no.Text = ofrmFind.strCityCode; txtserial_name.Text = ofrmFind.strCityName; } } } }
private void btnCDiagZH_Click(object sender, EventArgs e) { string sql_select = "select zh_code ±àÂë,zh_name Ö¢ºò from T_ZH where rownum<200"; List <string> oldlist = new List <string>(); oldlist.Add("zh_name"); oldlist.Add("zh_code"); oldlist.Add("py"); List <string> Newlist = new List <string>(); Newlist.Add("Ö¢ºò"); Newlist.Add("±àÂë"); Newlist.Add("Ö¢ºòÆ´Òô"); Bifrost.frmCode f = new frmCode(sql_select, oldlist, Newlist); if (f.ShowDialog() == DialogResult.OK) { if (App.SelectObj != null) { if (App.SelectObj.Select_Row != null) { DataRow row = App.SelectObj.Select_Row; int rowindex = 0; if (this.dataGridViewX1.CurrentCell.RowIndex >= 0) { rowindex = dataGridViewX1.CurrentCell.RowIndex; } else { return; } DataRow objRow = GetDiagData().Tables[0].Rows[rowindex]; objRow["diagnosename"] = row["¼²²¡Ãû³Æ"].ToString(); objRow["icd10code"] = row["¼²²¡±àÂë"].ToString(); objRow["ischinese"] = "1"; App.SelectObj = null; } } } }