public lSearchCtrl crtSearchCtrl(lTableInfo tblInfo, int iCol, Point pos, Size size, lSearchCtrl.SearchMode mode) { lTableInfo.lColInfo col = tblInfo.m_cols[iCol]; switch (col.m_type) { case lTableInfo.lColInfo.lColType.text: case lTableInfo.lColInfo.lColType.uniqueText: lSearchCtrlText textCtrl = new lSearchCtrlText(col.m_field, col.m_alias, lSearchCtrl.ctrlType.text, pos, size); textCtrl.m_mode = mode; textCtrl.m_colInfo = col; return(textCtrl); case lTableInfo.lColInfo.lColType.dateTime: lSearchCtrlDate dateCtrl = new lSearchCtrlDate(col.m_field, col.m_alias, lSearchCtrl.ctrlType.dateTime, pos, size); return(dateCtrl); case lTableInfo.lColInfo.lColType.num: lSearchCtrlNum numCtrl = new lSearchCtrlNum(col.m_field, col.m_alias, lSearchCtrl.ctrlType.num, pos, size); return(numCtrl); case lTableInfo.lColInfo.lColType.currency: lSearchCtrlCurrency currencyCtrl = new lSearchCtrlCurrency(col.m_field, col.m_alias, lSearchCtrl.ctrlType.currency, pos, size); return(currencyCtrl); } return(null); }
public lCustomDGV(lTableInfo tblInfo) { m_tblInfo = tblInfo; DataTable dt = appConfig.s_contentProvider.CreateDataContent(m_tblInfo.m_tblName).m_dataTable; dt.TableNewRow += Dt_TableNewRow; m_dataTable = dt; }
public lSearchCtrl crtSearchCtrl(lTableInfo tblInfo, string colName, Point pos, Size size, lSearchCtrl.SearchMode mode) { int iCol = tblInfo.getColIndex(colName); if (iCol != -1) { return(crtSearchCtrl(tblInfo, iCol, pos, size, mode)); } return(null); }
private void updateCols() { m_dataGridView.Columns[0].Visible = false; lTableInfo tblInfo = m_tblInfo; int i = 1; for (; i < m_dataGridView.ColumnCount; i++) { //show hide columns if (tblInfo.m_cols[i].m_visible == false) { m_dataGridView.Columns[i].Visible = false; continue; } m_dataGridView.Columns[i].HeaderText = tblInfo.m_cols[i].m_alias; #if header_blue //header color blue m_dataGridView.Columns[i].HeaderCell.Style.BackColor = Color.Blue; m_dataGridView.Columns[i].HeaderCell.Style.ForeColor = Color.White; #endif switch (tblInfo.m_cols[i].m_type) { case lTableInfo.lColInfo.lColType.currency: m_dataGridView.Columns[i].DefaultCellStyle.Format = lConfigMng.getCurrencyFormat(); break; case lTableInfo.lColInfo.lColType.dateTime: m_dataGridView.Columns[i].DefaultCellStyle.Format = lConfigMng.getDisplayDateFormat(); break; } #if false m_dataGridView.Columns[i].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; m_dataGridView.Columns[i].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells; m_dataGridView.Columns[i].FillWeight = 1; #endif } m_dataGridView.Columns[i - 1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; m_dataGridView.Columns[i - 1].FillWeight = 1; }
public lSearchCtrl crtSearchCtrl(lTableInfo tblInfo, int iCol, Point pos, Size size) { return(crtSearchCtrl(tblInfo, iCol, pos, size, lSearchCtrl.SearchMode.match)); }
public lSearchCtrl crtSearchCtrl(lTableInfo tblInfo, string colName, Point pos, Size size) { return(crtSearchCtrl(tblInfo, colName, pos, size, lSearchCtrl.SearchMode.match)); }
public lSalaryDGV(lTableInfo tblInfo) : base(tblInfo) { }
public lInterPaymentDGV(lTableInfo tblInfo) : base(tblInfo) { }