private static void eUpdateEquipmentDescription(int i) { ((GuiMainWindow)session.FindById("wnd[0]")).Maximize(); ((GuiOkCodeField)session.FindById("wnd[0]/tbar[0]/okcd")).Text = "/nie02"; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiTextField)session.FindById("wnd[0]/usr/ctxtRM63E-EQUNR")).Text = AssetMaster[i].EquipmentNumber; ((GuiCTextField)session.FindById("wnd[0]/usr/ctxtRM63E-EQUNR")).CaretPosition = 8; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiTextField)session.FindById( "wnd[0]/usr/subSUB_EQKO:SAPLITO0:0152/subSUB_0152B:SAPLITO0:1525/txtITOB-SHTXT")).Text = AssetMaster[i].New.EquipmentDescription; ((GuiTextField)session.FindById( "wnd[0]/usr/subSUB_EQKO:SAPLITO0:0152/subSUB_0152B:SAPLITO0:1525/txtITOB-SHTXT")).CaretPosition = 24; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(11); var l = new LoggingSystem(); l.EquipmentNumber = AssetMaster[i].EquipmentNumber; l.Message = ((GuiStatusbar)session.FindById("wnd[0]/sbar")).Text; l.Type = "EQUIPMENT DESCRIPTION"; l.OldValue = AssetMaster[i].Old.EquipmentDescription; l.NewValue = AssetMaster[i].New.EquipmentDescription; AssetMaster[i].Old.EquipmentDescription = AssetMaster[i].New.EquipmentDescription; log.Add(l); }
private static void EUpdateModelNumber(int i) { ((GuiMainWindow)session.FindById("wnd[0]")).Maximize(); ((GuiOkCodeField)session.FindById("wnd[0]/tbar[0]/okcd")).Text = "/nie02"; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiTextField)session.FindById("wnd[0]/usr/ctxtRM63E-EQUNR")).Text = AssetMaster[i].EquipmentNumber; ((GuiCTextField)session.FindById("wnd[0]/usr/ctxtRM63E-EQUNR")).CaretPosition = 8; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiTextField)session.FindById( "wnd[0]/usr/tabsTABSTRIP/tabpT\\01/ssubSUB_DATA:SAPLITO0:0102/subSUB_0102D:SAPLITO0:1022/txtITOB-TYPBZ") ) .Text = AssetMaster[i].New.ModelNumber; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(11); var l = new LoggingSystem(); l.EquipmentNumber = AssetMaster[i].EquipmentNumber; l.Message = ((GuiStatusbar)session.FindById("wnd[0]/sbar")).Text; l.Type = "MODEL NUMBER"; l.OldValue = AssetMaster[i].Old.ModelNumber; l.NewValue = AssetMaster[i].New.ModelNumber; AssetMaster[i].Old.ModelNumber = AssetMaster[i].New.ModelNumber; log.Add(l); }
private static void EUpdateSubType(int i) { if (SubTypeCollections.FirstOrDefault(x => x.Value == AssetMaster[i].New.SubTypeDescription).Key == string.Empty) { Console.WriteLine("------------------------invalid type-----------" + AssetMaster[i].New.SubTypeDescription); } else { ((GuiMainWindow)session.FindById("wnd[0]")).Maximize(); ((GuiOkCodeField)session.FindById("wnd[0]/tbar[0]/okcd")).Text = "/nie02"; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiTextField)session.FindById("wnd[0]/usr/ctxtRM63E-EQUNR")).Text = AssetMaster[i].EquipmentNumber; ((GuiCTextField)session.FindById("wnd[0]/usr/ctxtRM63E-EQUNR")).CaretPosition = 8; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiTextField)(session.FindById("wnd[0]/usr/tabsTABSTRIP/tabpT\\01/ssubSUB_DATA:SAPLITO0:0102/subSUB_0102B:SAPLITO0:1080/ssubXUSR1080:SAPLXTOB:1000/ctxtEQUI-ZZITO_SUB_TYPE"))).Text = SubTypeCollections.FirstOrDefault(x => x.Value == AssetMaster[i].New.SubTypeDescription).Key; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(11); var l = new LoggingSystem(); l.EquipmentNumber = AssetMaster[i].EquipmentNumber; l.Message = ((GuiStatusbar)session.FindById("wnd[0]/sbar")).Text; l.Type = "SUB TYPE"; l.OldValue = AssetMaster[i].Old.SubTypeDescription; l.NewValue = AssetMaster[i].New.SubTypeDescription; AssetMaster[i].Old.SubTypeDescription = AssetMaster[i].New.SubTypeDescription; log.Add(l); } }
private static void EUpdateAssetDescription(int i) { AssetMaster[i].New.AssetDescription = AssetMaster[i].New.EquipmentDescription; ((GuiMainWindow)session.FindById("wnd[0]")).Maximize(); ((GuiOkCodeField)session.FindById("wnd[0]/tbar[0]/okcd")).Text = "/NAS02"; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiTextField)session.FindById("wnd[0]/usr/ctxtANLA-ANLN1")).Text = AssetMaster[i].AssetNumber; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiTextField)session.FindById( "wnd[0]/usr/subTABSTRIP:SAPLATAB:0100/tabsTABSTRIP100/tabpTAB01/ssubSUBSC:SAPLATAB:0200/subAREA1:SAPLAIST:1140/txtANLA-TXT50") ).Text = AssetMaster[i].New.AssetDescription;; ((GuiTextField)session.FindById( "wnd[0]/usr/subTABSTRIP:SAPLATAB:0100/tabsTABSTRIP100/tabpTAB01/ssubSUBSC:SAPLATAB:0200/subAREA1:SAPLAIST:1140/txtANLA-TXA50") ).Text = AssetMaster[i].New.AssetDescription; ((GuiTextField)session.FindById( "wnd[0]/usr/subTABSTRIP:SAPLATAB:0100/tabsTABSTRIP100/tabpTAB01/ssubSUBSC:SAPLATAB:0200/subAREA1:SAPLAIST:1140/txtANLH-ANLHTXT") ).Text = AssetMaster[i].New.AssetDescription; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(11); var l = new LoggingSystem(); l.EquipmentNumber = AssetMaster[i].EquipmentNumber; l.Message = ((GuiStatusbar)session.FindById("wnd[0]/sbar")).Text; l.Type = "ASSET DESCRIPTION"; l.OldValue = AssetMaster[i].Old.AssetDescription; l.NewValue = AssetMaster[i].New.AssetDescription; AssetMaster[i].Old.AssetDescription = AssetMaster[i].New.AssetDescription; log.Add(l); }
private static void EUpdateEquipmentLocation(int i) { ((GuiMainWindow)session.FindById("wnd[0]")).Maximize(); ((GuiOkCodeField)session.FindById("wnd[0]/tbar[0]/okcd")).Text = "/niw21"; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiTextField)session.FindById("wnd[0]/usr/ctxtRIWO00-QMART")).Text = "ZS"; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiTextField)session.FindById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB01/ssubSUB_GROUP_10:SAPLIQS0:7235/subCUSTOM_SCREEN:SAPLIQS0:7212/subSUBSCREEN_1:SAPLIQS0:7710/txtRIWO00-HEADKTXT")).Text = "EQUIPMENT MOVEMENT"; ((GuiTextField)session.FindById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB01/ssubSUB_GROUP_10:SAPLIQS0:7235/subCUSTOM_SCREEN:SAPLIQS0:7212/subSUBSCREEN_3:SAPLIQS0:7330/ctxtVIQMEL-STRMN")).Text = DateTime.Today.ToString("dd.MM.yyyy"); ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiComboBox)session.FindById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB01/ssubSUB_GROUP_10:SAPLIQS0:7235/subCUSTOM_SCREEN:SAPLIQS0:7212/subSUBSCREEN_4:SAPLIQS0:7900/ssubUSER0001:SAPLXQQM:0105/cmbZCBS_ETM_EMR_H-RECEIVER_TYP")).Key = GetLocationType(AssetMaster[i].New.EquipmentLocation); ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiCTextField)session.FindById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB01/ssubSUB_GROUP_10:SAPLIQS0:7235/subCUSTOM_SCREEN:SAPLIQS0:7212/subSUBSCREEN_4:SAPLIQS0:7900/ssubUSER0001:SAPLXQQM:0105/ctxtZCBS_ETM_EMR_H-REFERENCE_R")).Text = AssetMaster[i].New.EquipmentLocation; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiComboBox)session.FindById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB01/ssubSUB_GROUP_10:SAPLIQS0:7235/subCUSTOM_SCREEN:SAPLIQS0:7212/subSUBSCREEN_4:SAPLIQS0:7900/ssubUSER0001:SAPLXQQM:0105/cmbZCBS_ETM_EMR_H-SENDER_TYPE")).Key = GetLocationType(AssetMaster[i].Old.EquipmentLocation); ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiCTextField)session.FindById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB01/ssubSUB_GROUP_10:SAPLIQS0:7235/subCUSTOM_SCREEN:SAPLIQS0:7212/subSUBSCREEN_4:SAPLIQS0:7900/ssubUSER0001:SAPLXQQM:0105/ctxtZCBS_ETM_EMR_H-REFERENCE_S")).Text = AssetMaster[i].Old.EquipmentLocation; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiTab)session.FindById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB19")).Select(); ((GuiGridView)session.FindById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB19/ssubSUB_GROUP_10:SAPLIQS0:7235/subCUSTOM_SCREEN:SAPLIQS0:7212/subSUBSCREEN_1:SAPLIQS0:7900/ssubUSER0001:SAPLXQQM:0103/cntlALV_GRID_CONT/shellcont/shell")).ModifyCell(0, "EQUNR", AssetMaster[i].EquipmentNumber); ((GuiGridView)session.FindById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB19/ssubSUB_GROUP_10:SAPLIQS0:7235/subCUSTOM_SCREEN:SAPLIQS0:7212/subSUBSCREEN_1:SAPLIQS0:7900/ssubUSER0001:SAPLXQQM:0103/cntlALV_GRID_CONT/shellcont/shell")).TriggerModified(); ((GuiGridView)session.FindById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB19/ssubSUB_GROUP_10:SAPLIQS0:7235/subCUSTOM_SCREEN:SAPLIQS0:7212/subSUBSCREEN_1:SAPLIQS0:7900/ssubUSER0001:SAPLXQQM:0103/cntlALV_GRID_CONT/shellcont/shell")).PressEnter(); ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(11); if (!((GuiStatusbar)session.FindById("wnd[0]/sbar")).Text.Contains("saved")) { var l = new LoggingSystem(); l.EquipmentNumber = AssetMaster[i].EquipmentNumber; l.Message = ((GuiStatusbar)session.FindById("wnd[0]/sbar")).Text; l.Type = "EMR FAIL"; l.OldValue = AssetMaster[i].Old.EquipmentLocation; l.NewValue = AssetMaster[i].New.EquipmentLocation; //AssetMaster[i].Old.EquipmentLocation = AssetMaster[i].New.EquipmentLocation; log.Add(l); // Console.ReadLine(); } else { ((GuiOkCodeField)session.FindById("wnd[0]/tbar[0]/okcd")).Text = "/niw22"; ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); ((GuiButton)session.FindById("wnd[0]/tbar[1]/btn[13]")).Press(); ((GuiButton)session.FindById("wnd[0]/tbar[1]/btn[16]")).Press(); if (((GuiStatusbar)session.FindById("wnd[0]/sbar")).Text.Contains("Reference date for completion will be determined by notification type")) { ((GuiMainWindow)session.FindById("wnd[0]")).SendVKey(0); } if (((GuiStatusbar)session.FindById("wnd[0]/sbar")).Text.Contains("completed")) { var l = new LoggingSystem(); l.EquipmentNumber = AssetMaster[i].EquipmentNumber; l.Message = ((GuiStatusbar)session.FindById("wnd[0]/sbar")).Text; l.Type = "EMR SUCCESS"; l.OldValue = AssetMaster[i].Old.EquipmentLocation; l.NewValue = AssetMaster[i].New.EquipmentLocation; AssetMaster[i].Old.EquipmentLocation = AssetMaster[i].New.EquipmentLocation; log.Add(l); } else { var l = new LoggingSystem(); l.EquipmentNumber = AssetMaster[i].EquipmentNumber; l.Message = ((GuiStatusbar)session.FindById("wnd[0]/sbar")).Text; l.Type = "EMR FAIL"; l.OldValue = AssetMaster[i].Old.EquipmentLocation; l.NewValue = AssetMaster[i].New.EquipmentLocation; //AssetMaster[i].Old.EquipmentLocation = AssetMaster[i].New.EquipmentLocation; log.Add(l); } } }