Ecolab.Pages.CustomerTabPage.UpdateCustomer C# (CSharp) Method

UpdateCustomer() public method

Updates the customer.
public UpdateCustomer ( string strID, string strName ) : void
strID string
strName string
return void
        public void UpdateCustomer(string strID, string strName)
        {
            MouseKeyBoardSimulator objKeyPress = new MouseKeyBoardSimulator();
            MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab);
            HtmlInputText ctrl_ID = GetHtmlControl<HtmlInputText>(guiMap, "CustomerID");
            Thread.Sleep(2000);
            ctrl_ID.Focus();
            ctrl_ID.Value = "";
            ctrl_ID.ExtendedMouseClick();
            objKeyPress.SetNumeric(strID);
            MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab);
            HtmlInputText ctrl_Name = GetHtmlControl<HtmlInputText>(guiMap, "CustomerName");
            ctrl_Name.Value = "";
            ctrl_Name.ExtendedMouseClick();
            objKeyPress.SetText(strName);
            MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab);
            Thread.Sleep(1000);
            Telerik.ActiveBrowser.RefreshDomTree();
            Thread.Sleep(5000);
            MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Enter);
        }