public bool AceitarTermoDeUso()
        {
            bool _result = false;

            try
            {
                util.WaitForElementVisible(CheckAceite, 10);
                if (CheckAceite.Displayed)
                {
                    util.ScrollPage(2);
                    if (CheckAceite.Selected == false)
                    {
                        CheckAceite.Click();
                        Thread.Sleep(750);
                    }
                    if (CheckAceite.Selected == true)
                    {
                        BtnSubmit.Click();
                        _result = true;
                    }
                }
            }
            catch
            {
            }
            return(_result);
        }
 public void Logar(string usuario, string senha)
 {
     Email.PreencherCampo(usuario);
     Password.PreencherCampo(senha);
     //CapturarTela();
     BtnSubmit.ClicarEAguardar(tempoEspera);
 }
        /// <summary>
        /// To Create Select Multiple Items from a List Global Question
        /// </summary>
        public string CreateGQ_Date(DataRow dr)
        {
            if (dr != null)
            {
                reference = dr["Reference"].ToString() + "_" + DateTime.Now.ToString().Replace(' ', '_').Replace(':', '_').Replace('/', '_');
                TxtReference.Clear();
                TxtReference.SendKeys(reference);

                if (dr["Active"].ToString().ToLower() == "yes")
                {
                    RdoActiveYes.Click();
                }
                else
                {
                    RdoActiveNo.Click();
                }

                TxtLabel(dr["Label"].ToString());
                if (dr["Required"].ToString().ToLower() == "yes")
                {
                    RdoRequiredYes.Click();
                }
                else
                {
                    RdoRequiredNo.Click();
                }
                BaseMethods.DdlSelectByText(DdlAnswerFormat, dr["AnswerFormat"].ToString());

                BtnSubmit.Click();
                Thread.Sleep(2000);
                Assert.IsTrue(SuccessMessage.Displayed, reference + " - Date Global Question is not " + formSubmitType + " successfully");
                ExtentReport.test.Log(LogStatus.Pass, "Success Message is displayed, " + reference + " - Date Global Question " + formSubmitType + " successfully");
            }
            return(reference);
        }
Example #4
0
        protected void txtLIdsTrfDebit_TextChanged(object sender, EventArgs e)
        {
            double ValueConvert = Converter.GetDouble(txtLIdsTrfDebit.Text);

            txtLIdsTrfDebit.Text = Converter.GetString(String.Format("{0:0,0.00}", ValueConvert));
            BtnSubmit.Focus();
        }
        protected void BtnAddItem_Click(object sender, EventArgs e)
        {
            if (ddlKarat.SelectedIndex == 0)
            {
                ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Select Karat');", true);
                return;
            }
            try
            {
                txtPartyCode.ReadOnly = true;
                ddlPartyName.Enabled  = false;

                var prm = new object[31];
                prm[0]  = Converter.GetDateToYYYYMMDD(lblProcesDate.Text);
                prm[1]  = ddlCode.SelectedValue;
                prm[2]  = ddlCode.SelectedItem.Text.Substring(0, 4);
                prm[3]  = ddlCurrency.SelectedValue;
                prm[4]  = ddlKarat.SelectedValue;
                prm[5]  = txtItemName.Text;
                prm[6]  = txtPurity.Text;
                prm[7]  = txtGrossWt.Text;
                prm[8]  = txtStoneWt.Text;
                prm[9]  = txtNetWt.Text;
                prm[10] = txtPureWt.Text;
                prm[11] = txtMakingRate.Text;
                prm[12] = txtStoneMakingRate.Text;
                prm[13] = txtMakingValue.Text;
                prm[14] = txtStoneMakingValue.Text;
                prm[15] = "0"; // txtTotalMetalValue.Text;
                prm[16] = txtTotalValue.Text;
                prm[17] = "4"; //Fixed Purchase Type
                prm[18] = "UnFixed Purchase Return";
                prm[19] = "2"; //FixedUnfixed
                prm[20] = ddlLocation.SelectedValue;
                prm[21] = ddlLocation.SelectedItem.Text;
                prm[22] = ddlPartyName.SelectedValue;
                prm[23] = lblPartyAccno.Text;
                prm[24] = txtRefName.Text;
                prm[25] = Converter.GetDateToYYYYMMDD(txtDueDate.Text);
                prm[26] = "0";
                prm[27] = "0";
                prm[28] = "0";
                prm[29] = "0";
                prm[30] = lblID.Text;

                int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("[Sp_InsertWfItemGoldReturn]", prm, "A2ZACGMS"));

                if (result == 0)
                {
                    ClearInfo();
                    gvItemDetailsInfo();
                    BtnSubmit.Focus();
                }
            }

            catch (Exception Ex)
            {
                throw Ex;
            }
        }
Example #6
0
        protected void txtInstlAmt_TextChanged(object sender, EventArgs e)
        {
            if (txtLoanAmt.Text == string.Empty)
            {
                txtInstlAmt.Text = string.Empty;
                txtLoanAmt.Focus();
                //String csname1 = "PopupScript";
                //Type cstype = GetType();
                //ClientScriptManager cs = Page.ClientScript;

                //if (!cs.IsStartupScriptRegistered(cstype, csname1))
                //{
                //    String cstext1 = "alert('Please Input Loan Amount');";
                //    cs.RegisterStartupScript(cstype, csname1, cstext1, true);
                //}
                ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Input Loan Amount');", true);
                return;
            }



            double instlAmt1 = Convert.ToDouble(txtInstlAmt.Text);

            loanAmt = Convert.ToDouble(txtLoanAmt.Text);//loan amount
            double no      = (loanAmt / instlAmt1);
            int    NoInstl = Converter.GetInteger(Math.Round(no));

            txtNoOfInstl.Text = Convert.ToString(NoInstl);

            double linstl = Math.Abs((instlAmt1 * (NoInstl - 1)) - loanAmt);

            txtInstlAmt.Text     = Convert.ToString(string.Format("{0:0,0.00}", instlAmt1));
            txtLastInstlAmt.Text = Convert.ToString(string.Format("{0:0,0.00}", linstl));
            BtnSubmit.Focus();
        }
    protected void TxtAccName_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string   CUNAME  = TxtAccName.Text;
            string[] custnob = CUNAME.Split('_');

            if (custnob.Length > 1)
            {
                AC_Status = CC.GetAccStatus(TxtBrcd.Text, TxtPcd.Text, custnob[1].ToString());
                if (AC_Status == "1")
                {
                    TxtAccName.Text     = custnob[0].ToString();
                    TxtAccno.Text       = (string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString());
                    ViewState["CUSTNO"] = custnob[2].ToString();
                    ViewState["GLCODE"] = avs5043.getgldr(TxtAccno.Text, TxtPcd.Text, TxtBrcd.Text).Split('_')[0].ToString();
                    BtnSubmit.Focus();
                }
            }
        }
        catch (Exception ex)
        {
            ExceptionLogging.SendErrorToText(ex);
        }
    }
Example #8
0
        protected void txtLoanAmt_TextChanged(object sender, EventArgs e)
        {
            double ValueConvert = Converter.GetDouble(txtLoanAmt.Text);

            txtLoanAmt.Text = Converter.GetString(String.Format("{0:0,0.00}", ValueConvert));

            if (txtNoOfInstl.Text != "")
            {
                no = Convert.ToInt32(txtNoOfInstl.Text);

                loanAmt = Convert.ToDouble(txtLoanAmt.Text);//loan amount

                instlAmt = (loanAmt / no);
                instlAmt = Math.Round(instlAmt);

                double linstl = Math.Abs((instlAmt * (no - 1)) - loanAmt);

                txtInstlAmt.Text     = Convert.ToString(string.Format("{0:0,0.00}", instlAmt));
                txtLastInstlAmt.Text = Convert.ToString(string.Format("{0:0,0.00}", linstl));
                BtnSubmit.Focus();
            }
            else
            {
                txtNoOfInstl.Focus();
            }
        }
 public void Salvar(string nome, string email, string senha, string confirmacaoSenha)
 {
     Nome.PreencherCampo(nome);
     Email.PreencherCampo(email);
     Password.PreencherCampo(senha);
     ConfirmPassword.PreencherCampo(confirmacaoSenha);
     BtnSubmit.Clicar().Aguardar(tempoEspera);
 }
Example #10
0
 public string LoginUserInvalidCredentials(string username, string password)
 {
     TxtUserName.SendKeys(username);
     TxtPassword.SendKeys(password);
     BtnSubmit.Click();
     Thread.Sleep(5000);
     ErrorMessage = driver.FindElement(By.CssSelector(".alert.alert-danger"));
     return(ErrorMessage.Text);
 }
        public string CreateGQ_FileUpload(DataRow dr)
        {
            Thread.Sleep(2000);
            BtnAddGlobalQuestion.Click();
            RdoFileUpload.Click();
            BtnSubmit.Click();
            ManageGlobalQuestionPage mGQPage = new ManageGlobalQuestionPage(driver);

            return(mGQPage.CreateGQ_FileUpload(dr));
        }
        public string CreateGQ_SelectMultipleitems(DataRow dr)
        {
            Thread.Sleep(2000);
            BtnAddGlobalQuestion.Click();
            RdoSelectMultipleItems.Click();
            BtnSubmit.Click();
            ManageGlobalQuestionPage mGQPage = new ManageGlobalQuestionPage(driver);

            return(mGQPage.CreateGQ_SelectMultipleitems(dr));
        }
        public void EditGQ_SelectMultipleitems(DataRow drAdd, DataRow drEdit)
        {
            Thread.Sleep(2000);
            BtnAddGlobalQuestion.Click();
            RdoSelectMultipleItems.Click();
            BtnSubmit.Click();
            ManageGlobalQuestionPage mGQPage = new ManageGlobalQuestionPage(driver);

            mGQPage.EditGQ_SelectMultipleitems(drAdd, drEdit);
        }
        public void EditGQ_FileUpload(DataRow drAdd, DataRow drEdit)
        {
            Thread.Sleep(2000);
            BtnAddGlobalQuestion.Click();
            RdoFileUpload.Click();
            BtnSubmit.Click();
            ManageGlobalQuestionPage mGQPage = new ManageGlobalQuestionPage(driver);

            mGQPage.EditGQ_FileUpload(drAdd, drEdit);
        }
        public void EditGQ_SingleLineTextBox(DataRow drAdd, DataRow drEdit)
        {
            Thread.Sleep(2000);
            BtnAddGlobalQuestion.Click();
            RdoSingleLineTextBox.Click();
            BtnSubmit.Click();
            ManageGlobalQuestionPage mGQPage = new ManageGlobalQuestionPage(driver);

            mGQPage.EditGQ_SingleLineTextBox(drAdd, drEdit);
        }
        public void EditGQ_MultiLineTextArea(DataRow drAdd, DataRow drEdit)
        {
            Thread.Sleep(2000);
            BtnAddGlobalQuestion.Click();
            RdoMultiLineTextArea.Click();
            BtnSubmit.Click();
            ManageGlobalQuestionPage mGQPage = new ManageGlobalQuestionPage(driver);

            mGQPage.EditGQ_MultiLineTextArea(drAdd, drEdit);
        }
        public string CreateGQ_MultiLineTextArea(DataRow dr)
        {
            Thread.Sleep(2000);
            BtnAddGlobalQuestion.Click();
            RdoMultiLineTextArea.Click();
            BtnSubmit.Click();
            ManageGlobalQuestionPage mGQPage = new ManageGlobalQuestionPage(driver);

            return(mGQPage.CreateGQ_MultiLineTextArea(dr));
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!IsPostBack)
            {
                LvSortables.DataSource = GetSortables();
                LvSortables.DataBind();
                BtnSubmit.DataBind();
            }
        }
 protected void Txtone_TextChanged(object sender, EventArgs e)
 {
     try
     {
         BtnSubmit.Focus();
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
 public void Paymenttype()
 {
     try
     {
         if (ddlPayType.SelectedValue.ToString() == "0")
         {
             Transfer.Visible  = false;
             Transfer1.Visible = false;
             DivAmount.Visible = false;
         }
         else if (ddlPayType.SelectedValue.ToString() == "1")
         {
             ViewState["PAYTYPE"] = "CASH";
             Transfer.Visible     = false;
             Transfer1.Visible    = false;
             DivAmount.Visible    = true;
             txtNarration.Text    = "By Cash";
             Clear();
             BtnSubmit.Focus();
         }
         else if (ddlPayType.SelectedValue.ToString() == "2")
         {
             ViewState["PAYTYPE"]   = "TRANSFER";
             Transfer.Visible       = true;
             Transfer1.Visible      = false;
             DivAmount.Visible      = true;
             txtNarration.Text      = "By TRF";
             autoglname1.ContextKey = Session["BRCD"].ToString();
             Clear();
             txtProdType1.Focus();
         }
         else if (ddlPayType.SelectedValue.ToString() == "4")
         {
             ViewState["PAYTYPE"]   = "CHEQUE";
             Transfer.Visible       = true;
             Transfer1.Visible      = true;
             DivAmount.Visible      = true;
             txtNarration.Text      = "By TRF";
             autoglname1.ContextKey = Session["BRCD"].ToString();
             Clear();
             txtProdType1.Focus();
         }
         else
         {
             Clear();
             Transfer.Visible  = false;
             Transfer1.Visible = false;
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
Example #21
0
 private void BtnBrowser_Click(object sender, EventArgs e)
 {
     txtBrowser.Text = cmnService.J_OpenFileDialog("Microsoft Access | *.mdb", "Microsoft Access | *.mdb", "Choose the database to connect");
     if (txtBrowser.Text == "")
     {
         BtnBrowser.Select();
     }
     else
     {
         BtnSubmit.Select();
     }
 }
 protected void TxtNoOfNotes_TextChanged(object sender, EventArgs e)
 {
     try
     {
         int Tot = 0;
         Tot           = (Convert.ToInt32(TxtNoOfNotes.Text)) * (Convert.ToInt32(TxtNoteType.Text));
         TxtTotal.Text = Convert.ToString(Tot);
         BtnSubmit.Focus();
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
Example #23
0
        /// <summary>
        /// click submit button
        /// </summary>
        /// <returns></returns>
        public PropertyOwnerPage ClickSubmit()
        {
            while (!BtnSubmit.Displayed && BtnSubmit.Enabled)
            {
                Thread.Sleep(100);
            }

            BtnSubmit.Click();
            while (!Driver.driver.Url.Contains("Home/Index"))
            {
                Thread.Sleep(100);
            }
            return(new PropertyOwnerPage());
        }
        void ReleaseDesignerOutlets()
        {
            if (BtnSubmit != null)
            {
                BtnSubmit.Dispose();
                BtnSubmit = null;
            }

            if (CityTextField != null)
            {
                CityTextField.Dispose();
                CityTextField = null;
            }
        }
Example #25
0
        public AcoesLogar Logar(string usuario, string senha)
        {
            AcoesLogar resultado = AcoesLogar.Incorreto;

            Email.PreencherCampo(usuario);
            Password.PreencherCampo(senha);
            //CapturarTela();
            BtnSubmit.ClicarEAguardar(tempoEspera);
            if (Driver.ObterUrl().ToLower() == new AtendimentoConsumidorPage().ObterPaginaUrl().ToLower())
            {
                resultado = AcoesLogar.Sucesso;
            }

            return(resultado);
        }
Example #26
0
        public void submitItem()
        {
            try
            {
                Common.waitForElementIsPresent("First name field", "xpath", "//input[@id='wpsc_checkout_form_2']", Constants.TIME_OUT);
                BtnSubmit.Click();
                ExReports.reportPass("'Purchase' button is clicked");

                Common.checkTextIsPresent("Thank you, your purchase is pending");
            }
            catch (Exception e)
            {
                ExReports.reportFail("Submit Item error" + e.Message);
                throw;
            }
        }
        /// <summary>
        /// To Create Multi Line Text Area Global Question
        /// </summary>
        public string CreateGQ_MultiLineTextArea(DataRow dr)
        {
            if (dr != null)
            {
                reference = dr["Reference"].ToString() + "_" + DateTime.Now.ToString().Replace(' ', '_').Replace(':', '_').Replace('/', '_');
                TxtReference.Clear();
                TxtReference.SendKeys(reference);

                if (dr["Active"].ToString().ToLower() == "yes")
                {
                    RdoActiveYes.Click();
                }
                else
                {
                    RdoActiveNo.Click();
                }

                TxtLabel(dr["Label"].ToString());
                if (dr["Required"].ToString().ToLower() == "yes")
                {
                    RdoRequiredYes.Click();
                }
                else
                {
                    RdoRequiredNo.Click();
                }
                TxtMaxLength.Clear();
                TxtMaxLength.SendKeys(dr["MaxLength"].ToString());
                if (dr["MaxLenghtType"].ToString().ToLower() == "characters")
                {
                    RdoCharacters.Click();
                }
                else
                {
                    RdoWords.Click();
                }
                BtnSubmit.Click();
                Thread.Sleep(2000);
                Assert.IsTrue(SuccessMessage.Displayed, reference + " - Multi Line Text Area Global Question is not " + formSubmitType + " successfully");
                ExtentReport.test.Log(LogStatus.Pass, "Success Message is displayed, " + reference + " - Multi Line Text Area Global Question " + formSubmitType + " successfully");
            }
            return(reference);
        }
Example #28
0
        public bool Submit()
        {
            bool _result = false;

            try
            {
                util.WaitForElementVisible(BtnSubmit, 45);
                if (BtnSubmit.Displayed)
                {
                    BtnSubmit.Click();
                    //Thread.Sleep(3000);

                    _result = true;
                }
            }
            catch
            {
            }
            return(_result);
        }
 protected void TxtAccno_TextChanged(object sender, EventArgs e)
 {
     try
     {
         int Result = LI.CheckAccountExist(TxtAccno.Text, TxtPcd.Text, Session["BRCD"].ToString());
         if (Result == 0)
         {
             WebMsgBox.Show("Sorry Account Number Not Exist...!!", this.Page);
             TxtAccno.Text   = "";
             TxtAccName.Text = "";
             TxtAccno.Focus();
             return;
         }
         string AT = "";
         AC_Status = CC.GetAccStatus(TxtBrcd.Text, TxtPcd.Text, TxtAccno.Text);
         if (AC_Status == "1")
         {
             AT = BD.Getstage1(TxtAccno.Text, TxtBrcd.Text, TxtPcd.Text);
             if (AT != null)
             {
                 if (AT != "1003")
                 {
                     lblMessage.Text = "Sorry Customer not Authorise.........!!";
                     ModalPopup.Show(this.Page);
                     return;
                 }
                 else
                 {
                     TxtAccName.Text     = CC.GetCustNameAc(TxtAccno.Text, TxtBrcd.Text, TxtPcd.Text);
                     ViewState["GLCODE"] = avs5043.getgldr(TxtAccno.Text, TxtPcd.Text, TxtBrcd.Text).Split('_')[0].ToString();
                     ViewState["CUSTNO"] = avs5043.getgldr(TxtAccno.Text, TxtPcd.Text, TxtBrcd.Text).Split('_')[1].ToString();
                     BtnSubmit.Focus();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         ExceptionLogging.SendErrorToText(ex);
     }
 }
Example #30
0
 protected void TxtPeriod_TextChanged(object sender, EventArgs e)
 {
     try
     {
         string RT = "";
         string RR = FDR.Getrate(TxtPeriod.Text, TxtProcode.Text, ddlduration.SelectedValue, ViewState["ACCTYPE"].ToString(), Session["BRCD"].ToString(), Session["EntryDate"].ToString());
         if (RR != null)
         {
             TxtRate.Text = RR;
             RT           = TxtRate.Text;
             string PT = ddlduration.SelectedItem.Text;
             if (PT == "Days" || PT == "DAYS")
             {
                 PT = "D";
             }
             else if (PT == "Months" || PT == "MONTHS")
             {
                 PT = "M";
             }
             if (RT != "")
             {
                 // TxtDepoAmt.Text = TxtTotalAmount.Text;
                 double RATE = Convert.ToDouble(RT);
                 DtDueDate.Text = conn.AddMonthDay(dtDeposDate.Text, TxtPeriod.Text, PT).Replace("12:00:00", "");
                 CalculatedepositINT(float.Parse(TxtDepoAmt.Text), TxtProcode.Text, float.Parse(RATE.ToString()), Convert.ToInt32(TxtPeriod.Text), ddlIntrestPay.SelectedItem.Text, ddlduration.SelectedValue);
             }
             BtnSubmit.Focus();
         }
         else
         {
             WebMsgBox.Show("Invalid Period, Add from Interest Master....!", this.Page);
             TxtPeriod.Text = "";
             TxtPeriod.Focus();
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }