Example #1
0
        private void grdColumnName_CellDoubleClick(object sender, GrapeCity.Win.MultiRow.CellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }

            if (Modified && !ShowConfirmDialog(MsgQstConfirmUpdateData))
            {
                return;
            }

            ClearStatusMessage();

            lblTableName.Text    = grdColumnName.Rows[e.RowIndex][CellName(nameof(ColumnNameSetting.TableNameText))].Value.ToString();
            ColumnName           = grdColumnName.Rows[e.RowIndex][CellName(nameof(ColumnNameSetting.ColumnName))].Value.ToString();
            lblOriginalName.Text = grdColumnName.Rows[e.RowIndex][CellName(nameof(ColumnNameSetting.OriginalName))].Value.ToString();
            TableName            = grdColumnName.Rows[e.RowIndex][CellName(nameof(ColumnNameSetting.TableName))].Value.ToString();

            if (grdColumnName.Rows[e.RowIndex][CellName(nameof(ColumnNameSetting.Alias))].DisplayText.Trim() != "")
            {
                txtAlias.Text = grdColumnName.Rows[e.RowIndex][CellName(nameof(ColumnNameSetting.Alias))].Value.ToString();
            }
            else
            {
                txtAlias.Clear();
            }

            Modified = false;
            txtAlias.Focus();
            BaseContext.SetFunction01Enabled(true);
            BaseContext.SetFunction02Enabled(true);
        }
Example #2
0
 private void grdCustomerModify_CellDoubleClick(object sender, GrapeCity.Win.MultiRow.CellEventArgs e)
 {
     ClearStatusMessage();
     if (e.RowIndex >= 0)
     {
         if (txtCustomerCodeFrom.Text == "")
         {
             txtCustomerCodeFrom.Text = grdCustomerModify.Rows[e.RowIndex].Cells[1].DisplayText;
             lblCustomerNameFrom.Text = grdCustomerModify.Rows[e.RowIndex].Cells[2].DisplayText;
         }
         else
         {
             txtCustomerCodeTo.Text = grdCustomerModify.Rows[e.RowIndex].Cells[1].DisplayText;
             lblCustomerNameTo.Text = grdCustomerModify.Rows[e.RowIndex].Cells[2].DisplayText;
         }
     }
 }