private static void InitCtrlKenhPhat(PLMultiChoiceGrid input, string usingTable, string foreignField) { string sql = string.Format(@"select * from {0} dth where exists(select first 1 1 from {1} ct where ct.{2}=dth.id) order by name", DMDaiTruyenHinh.TABLE_MAP, usingTable, foreignField); var ds = HelpDB.getDBService().LoadDataSet(sql, TNS_PROGRAMS_GRID_SCR.TABLE_NAME); if (ds != null && ds.Tables.Count > 0) { input._Init(ds.Tables[0], "ID", "NAME", InitColKenhPhat); input._GridView.BestFitColumns(); input._PopupContainerControl.AutoSizeMode = AutoSizeMode.GrowOnly; input._PopupContainerControl.AutoSize = true; input._GridView.OptionsView.ShowAutoFilterRow = true; input._GridView.BestFitColumns(); } }
private static void InitPlMultiChoiceGrid(PLMultiChoiceGrid input, string tableDm, string displayField, string usingTable, string foreignField,PLMultiChoiceGrid.InitGridColumns initCols) { string sql = string.Format(@"select * from {0} dm where exists(select first 1 1 from {1} ct where ct.{2}=dm.id) order by name", tableDm, usingTable, foreignField); var ds = HelpDB.getDBService().LoadDataSet(sql, tableDm); if (ds != null && ds.Tables.Count > 0) { input._Init(ds.Tables[0], "ID", displayField,initCols); input._GridView.BestFitColumns(); input._PopupContainerControl.AutoSizeMode = AutoSizeMode.GrowOnly; input._PopupContainerControl.AutoSize = true; input._GridView.OptionsView.ShowAutoFilterRow = true; input._GridView.BestFitColumns(); } }
public static void InitFileNguon(PLMultiChoiceGrid fileNguon) { const string sql = @"select scr.pgs_id,scr.name,scr.tu_ngay,scr.den_ngay,scr.ghi_chu,scr.nguoi_tao,scr.ngay_tao,scr.cong_ty from tns_programs_grid_scr scr where (scr.is_delete='N' or scr.is_delete is null) order by scr.ngay_tao desc,scr.name"; var ds = HelpDB.getDBService().LoadDataSet(sql, TNS_PROGRAMS_GRID_SCR.TABLE_NAME); if (ds != null && ds.Tables.Count > 0) { fileNguon._Init(ds.Tables[0], "PGS_ID", "NAME", InitColumnCtr); fileNguon._GridView.BestFitColumns(); fileNguon._PopupContainerControl.AutoSizeMode = AutoSizeMode.GrowOnly; fileNguon._PopupContainerControl.AutoSize = true; fileNguon._GridView.OptionsView.ShowAutoFilterRow = true; } }