Ejemplo n.º 1
0
 private void dataGridViewField_CellValueChanged(object sender, DataGridViewCellEventArgs e)
 {
     if (dataGridViewField.Columns[e.ColumnIndex].Name == "colSelectItem")
     {
         DataGridViewCell de       = dataGridViewField.Rows[e.RowIndex].Cells[e.ColumnIndex];
         string           emessage = "";
         if (!TableColumnGenerationHelper.validateSelectItemString((string)de.Value, out emessage))
         {
             MessageBox.Show(emessage);
             de.Value = "";
         }
     }
     if (dataGridViewField.Columns[e.ColumnIndex].Name == "colInputType")
     {
         DataGridViewCell de     = dataGridViewField.Rows[e.RowIndex].Cells[e.ColumnIndex];
         DataGridViewCell deitem =
             dataGridViewField.Rows[e.RowIndex].Cells[dataGridViewField.Columns["colSelectItem"].Index];
         InputUIControl iuc = webuiconfig.getInputUIControlByName(de.Value.ToString());
         deitem.ReadOnly = !iuc.HasItems;
         if (!iuc.HasItems)
         {
             deitem.Value = "";
         }
     }
 }
 public string GetPkQueryKey(ITable table)
 {
     return(string.Format(this.IdKeyName, TableColumnGenerationHelper.GeneratePorpertyNameByTableColumn(table.PrimaryKeys[0])));
 }
 public string GetPkProprtyName(ITable table)
 {
     return(TableColumnGenerationHelper.GeneratePorpertyNameByTableColumn(table.PrimaryKeys[0]));
 }