Пример #1
0
 public void ClickApprove()
 {
     waitForIt(_driver, ApproveButton);
     ApproveButton.WaitAndClick(_driver);
 }
 public void ClickApproveButton()
 {
     ApproveButton.ClickToSuccess();
 }
Пример #3
0
 public ApproveDeclinePage ClickApproveButton()
 {
     ApproveButton.Click();
     return(this);
 }
Пример #4
0
        //static string CurrencyFormat = "#,###";
        public static void FormatForm(Control ctrl)
        {
            foreach (Control c in ctrl.Controls)
            {
                if (c is DateEdit)
                {
                    DateEdit dtp = c as DateEdit;
                    dtp.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTimeAdvancingCaret;
                    dtp.DateTime = DateTime.Today;
                    if (dtp.Tag != null)
                    {
                        dtp.DateTime = DateTime.Today.AddDays(-5);
                    }
                    dtp.Properties.DisplayFormat.Format = VnCul;
                }
                else
                if (c is AutoXDatetime)
                {
                    AutoXDatetime dtp = c as AutoXDatetime;
                    dtp.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTimeAdvancingCaret;
                    dtp.DateTime = DateTime.Today;
                    dtp.Properties.DisplayFormat.Format = VnCul;
                }
                else
                if (c is ApproveButton)
                {
                    ApproveButton btn = c as ApproveButton;
                    btn.Visible = UserManagement.AllowApprove(btn.Bindingfor);
                }
                else
                if (c is TextBox || c is AutoTextBox)
                {
                    if (c.Tag == null)
                    {
                        continue;
                    }
                    string tag = c.Tag.ToString().ToLower();
                    switch (tag)
                    {
                    case "money":
                        c.KeyPress    += UtilityFunction_KeyPress;
                        c.TextChanged += ctrl_TextChanged;
                        break;

                    case "totalmoney":
                        c.KeyPress += UtilityFunction_KeyPress;
                        break;

                    case "number":
                        c.KeyPress += UtilityFunction_KeyPress;
                        break;
                    }
                }
                if (c.HasChildren)
                {
                    if (!(c is DevExpress.XtraGrid.GridControl))
                    {
                        FormatForm(c);
                    }
                }
            }
        }