public void GridSelectAll(string GridID) { GuiSession SapSession = getCurrentSession(); GuiGridView gridView = (GuiGridView)SapSession.ActiveWindow.FindById(GridID, "GuiGridView"); gridView.SelectAll(); }
public string Grid_GetCellValue(string GridID, Int32 rowIndex, string columnID) { GuiSession SapSession = getCurrentSession(); GuiGridView gridView = (GuiGridView)SapSession.ActiveWindow.FindById(GridID, "GuiGridView"); return(gridView.GetCellValue(rowIndex, columnID)); }
public void Grid_Select_Row(string GridID, string rowIndex) { GuiSession SapSession = getCurrentSession(); GuiGridView gridView = (GuiGridView)SapSession.ActiveWindow.FindById(GridID, "GuiGridView"); gridView.SelectedRows = rowIndex; }
public string Grid_CountRows(string GridID) { GuiSession SapSession = getCurrentSession(); GuiGridView gridView = (GuiGridView)SapSession.ActiveWindow.FindById(GridID, "GuiGridView"); return(gridView.RowCount.ToString()); }
public void Grid_SelectRow_AndDoubleClick(string GridID, string rowIndex) { GuiSession SapSession = getCurrentSession(); GuiGridView gridView = (GuiGridView)SapSession.ActiveWindow.FindById(GridID, "GuiGridView"); gridView.SelectedRows = rowIndex; gridView.DoubleClickCurrentCell(); }
public void Grid_SelectCell_AndDoubleClick(string GridID, string rowIndex, string columnID) { GuiSession SapSession = getCurrentSession(); GuiGridView gridView = (GuiGridView)SapSession.ActiveWindow.FindById(GridID, "GuiGridView"); gridView.SetCurrentCell(Convert.ToInt32(rowIndex), columnID); gridView.DoubleClickCurrentCell(); }
public bool Grid_ToolBarButton_PressByName(string GridID, string ButtonName) { GuiSession SapSession = getCurrentSession(); GuiGridView gridView = (GuiGridView)SapSession.ActiveWindow.FindById(GridID, "GuiGridView"); gridView.PressToolbarButton(ButtonName); return(true); }
public static void ModifyCell(string id, GuiGridView gridView, GuiSession session, int row, string column, string value) { ValidateGridTarget.ValidateTarget(id, gridView, session); if (gridView == null) { gridView = (GuiGridView)(session).FindById(id); } gridView.ModifyCell(row, column, value); }
public static void MoveRows(string id, GuiGridView gridView, GuiSession session, int fromrow, int torow, int destRow) { ValidateGridTarget.ValidateTarget(id, gridView, session); if (gridView == null) { gridView = (GuiGridView)(session).FindById(id); } gridView.MoveRows(fromrow, torow, destRow); }
public static void DeselectColumn(string id, GuiGridView gridView, GuiSession session, String Column) { ValidateGridTarget.ValidateTarget(id, gridView, session); if (gridView == null) { gridView = (GuiGridView)(session).FindById(id); } gridView.DeselectColumn(Column); }
public static bool IsColumnFiltered(string id, GuiGridView gridView, GuiSession session, string column) { ValidateGridTarget.ValidateTarget(id, gridView, session); if (gridView == null) { gridView = (GuiGridView)(session).FindById(id); } return(gridView.IsColumnFiltered(column)); }
public static string GetCellValue(string id, GuiGridView gridView, GuiSession session, int row, string column) { ValidateGridTarget.ValidateTarget(id, gridView, session); if (gridView == null) { gridView = (GuiGridView)(session).FindById(id); } return(gridView.GetCellValue(row, column)); }
public static void SelectToolbarMenuItem(string id, GuiGridView gridView, GuiSession session, string menuId) { ValidateGridTarget.ValidateTarget(id, gridView, session); if (gridView == null) { gridView = (GuiGridView)(session).FindById(id); } gridView.SelectToolbarMenuItem(menuId); }
public static void PressToolbarContextButton(string id, GuiGridView gridView, GuiSession session, String ButtonId) { ValidateGridTarget.ValidateTarget(id, gridView, session); if (gridView == null) { gridView = (GuiGridView)(session).FindById(id); } gridView.PressToolbarContextButton(ButtonId); }
public static T FindDescendantByProperty <T>(this GuiGridView GridView, Func <T, bool> Property = null) where T : class { if (Property == null) { Property = new Func <T, bool>(t => true); } return(findDescendantByPropertyTemplate <T>(GridView.Children, Property)); }
public static void SetColumnWidth(string id, GuiGridView gridView, GuiSession session, string column, int width) { ValidateGridTarget.ValidateTarget(id, gridView, session); if (gridView == null) { gridView = (GuiGridView)(session).FindById(id); } gridView.SetColumnWidth(column, width); }
public static string GetColumnTitles(string id, GuiGridView gridView, GuiSession session, String Column) { ValidateGridTarget.ValidateTarget(id, gridView, session); if (gridView == null) { gridView = (GuiGridView)(session).FindById(id); } return((gridView.GetColumnTitles(Column) as GuiCollection).Item(0)); }
public static void SelectContextMenuItem(string id, GuiGridView gridView, GuiSession session, string functionCode) { ValidateGridTarget.ValidateTarget(id, gridView, session); if (gridView == null) { gridView = (GuiGridView)(session).FindById(id); } gridView.SelectContextMenuItem(functionCode); }
public static string GetDisplayedColumnTitle(string id, GuiGridView gridView, GuiSession session, String Column) { ValidateGridTarget.ValidateTarget(id, gridView, session); if (gridView == null) { gridView = (GuiGridView)(session).FindById(id); } return(gridView.GetDisplayedColumnTitle(Column)); }
public static void DoubleClick(string id, GuiGridView gridView, GuiSession session, int row, string column) { ValidateGridTarget.ValidateTarget(id, gridView, session); if (gridView == null) { gridView = (GuiGridView)(session).FindById(id); } gridView.DoubleClick(row, column); }
public static void SelectAll(string id, GuiGridView gridView, GuiSession session) { ValidateGridTarget.ValidateTarget(id, gridView, session); if (gridView == null) { gridView = (GuiGridView)(session).FindById(id); } gridView.SelectAll(); }
public static void ContextMenu(string id, GuiGridView gridView, GuiSession session) { ValidateGridTarget.ValidateTarget(id, gridView, session); if (gridView == null) { gridView = (GuiGridView)(session).FindById(id); } gridView.ContextMenu(); }
public static void ValidateTarget(string id, GuiGridView gridView, GuiSession session) { if (gridView == null && string.IsNullOrEmpty(id)) { throw new Exception("Parameters for the Target object not provided: id or GuiGridView object"); } if (session == null) { throw new Exception("SAP session parameter is required and was not provided."); } }
//public string GetMsgWindowText(string strWindowID) { // GuiSession SapSession = getCurrentSession(); // GuiMessageWindow wndMsgWindow = (GuiMessageWindow)SapSession.ActiveWindow.FindById(strWindowID, "GuiMessageWindow"); // wndMsgWindow.SetFocus(); // return wndMsgWindow.Text; //} //public string GetFrameWindowText(string strWindowID) { // GuiSession SapSession = getCurrentSession(); // GuiFrameWindow wndFrmWindow = (GuiFrameWindow)SapSession.ActiveWindow.FindById(strWindowID, "GuiFrameWindow"); // wndFrmWindow.SetFocus(); // return wndFrmWindow.Text; //} //public string GetMainWindowText(string strWindowID) { // GuiSession SapSession = getCurrentSession(); // GuiMainWindow wndMainWindow = (GuiMainWindow)SapSession.ActiveWindow.FindById(strWindowID, "GuiMainWindow"); // wndMainWindow.SetFocus(); // return wndMainWindow.Text; //} public void ContextMenuSelectItem(string GridID, string ContextMenuItem) { if (GridID == "") { GridID = "wnd[0]/usr/cntlGRID1/shellcont/shell"; } GuiSession SapSession = getCurrentSession(); GuiGridView gridView = (GuiGridView)SapSession.ActiveWindow.FindById(GridID, "GuiGridView"); gridView.ContextMenu(); gridView.SelectContextMenuItemByText(ContextMenuItem); }
public static void DoubleClickCell(this GuiGridView GridView, int row, string FriendlyColumn) { string column = ""; GridView.SelectAll(); foreach (var colName in GridView.SelectedColumns) { string displayCol = GridView.GetDisplayedColumnTitle(colName); if (displayCol.IndexOf(FriendlyColumn) >= 0) { column = colName; break; } } GridView.ClearSelection(); GridView.DoubleClick(row, column); }
public static string GetCell(GuiGridView GridView, int row, string FriendlyColName) { string column = ""; GridView.SelectAll(); foreach (var colName in GridView.SelectedColumns) { string displayCol = GridView.GetDisplayedColumnTitle(colName); if (displayCol.IndexOf(FriendlyColName) >= 0) { column = colName; break; } } GridView.ClearSelection(); return GridView.GetCellValue(row, column); }
public static string GetCellValueByDisplayColumn(this GuiGridView GridView, int row, string FriendlyColName) { string column = ""; GridView.SelectAll(); foreach (var colName in GridView.SelectedColumns) { string displayCol = GridView.GetDisplayedColumnTitle(colName); if (displayCol.IndexOf(FriendlyColName) >= 0) { column = colName; break; } } GridView.ClearSelection(); return(GridView.GetCellValue(row, column)); }
public static string GetCellValue(this GuiGridView GridView, int col, int row) { int index = 0; string column = ""; GridView.SelectAll(); foreach (var colName in GridView.SelectedColumns) { if (index == col) { column = colName; break; } index++; } GridView.ClearSelection(); return(GridView.GetCellValue(row, column)); }
public static T FindByName <T>(this GuiGridView GridView, string Name) where T : class { return(findByNameTemplate <T>(Name, GridView.FindByName)); }
public static T FindById <T>(this GuiGridView GridView, string Id) where T : class { return(findByIdTemplate <T>(Id, GridView.FindById)); }
public static IEnumerable <T> FindAllByName <T>(this GuiGridView GridView, string Name) where T : class { return(findAllByNameTemplate <T>(Name, GridView.FindAllByName)); }