private void txtserial_no_Properties_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { using (frmCode ofrmCode = new frmCode()) { ofrmCode.ShowDialog(); if (ofrmCode.strCityCode != "") { txtserial_no.EditValue = ofrmCode.strCityCode; txtName.Text = ofrmCode.strCityName; txtProvince.Text = ofrmCode.strProvince; } } }
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 clCodeCity_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { if (mState == "NEW" || mState == "EDIT") { int rowHandle = dgvDetails.FocusedRowHandle; if (!string.IsNullOrEmpty(dgvDetails.GetRowCellValue(rowHandle, "org_serial_no").ToString())) { //编辑状态禁止改动此栏内容 return; } using (frmCode ofrmCode = new frmCode()) { ofrmCode.ShowDialog(); if (ofrmCode.strCityCode != "") { dgvDetails.SetRowCellValue(rowHandle, "serial_no", ofrmCode.strCityCode); dgvDetails.SetRowCellValue(rowHandle, "name", ofrmCode.strCityName); } } } }