Exemplo n.º 1
0
        public void TrimData()
        {
            if (Name == null)
            {
                Name = "";
            }

            if (EmailId == null)
            {
                EmailId = "";
            }

            if (EncryptedEmailId == null)
            {
                EncryptedEmailId = "";
            }

            if (MobileNo == null)
            {
                MobileNo = "";
            }

            if (EncryptedMobileNo == null)
            {
                EncryptedMobileNo = "";
            }

            if (LoginPassword == null)
            {
                LoginPassword = "";
            }

            if (EncryptedLoginPassword == null)
            {
                EncryptedLoginPassword = "";
            }

            if (PasswordResetToken == null)
            {
                PasswordResetToken = "";
            }

            if (Remarks == null)
            {
                Remarks = "";
            }


            Name              = Name.Trim();
            EmailId           = EmailId.Trim();
            EncryptedEmailId  = EncryptedEmailId.Trim();
            MobileNo          = MobileNo.Trim();
            EncryptedMobileNo = EncryptedMobileNo.Trim();

            LoginPassword          = LoginPassword.Trim();
            EncryptedLoginPassword = EncryptedLoginPassword.Trim();

            PasswordResetToken = PasswordResetToken.Trim();
            Remarks            = Remarks.Trim();
        }
Exemplo n.º 2
0
 public LoginPage Login(string email, string password)
 {
     EmailId.SendKeys(email);
     PasswordId.SendKeys(password);
     LoginButton.Click();
     return(new LoginPage());
 }
        public void register(string name, string gender, string dob, string add, string city, string state, string pin, string mobile, string email, string password)
        {
            try
            {
                NewCustomerLink.Click();
                Name.SendKeys(name);
                foreach (var gender1 in Gender)
                {
                    String gen = gender1.GetAttribute("value");
                    if (String.Equals(gen, gender, StringComparison.OrdinalIgnoreCase))
                    {
                        gender1.Click();
                    }
                }
                DateOfBirth.SendKeys(dob);
                Address.SendKeys(add);
                City.SendKeys(city);
                State.SendKeys(state);
                PinNo.SendKeys(pin);
                TelephoneNo.SendKeys(mobile);
                EmailId.SendKeys(email);
                Password.SendKeys(password);

                IJavaScriptExecutor js = (IJavaScriptExecutor)driver;
                js.ExecuteScript("window.scrollTo(0, document.body.scrollHeight);");
                WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(20));
                wait.Until(ExpectedConditions.ElementToBeClickable(Submit)).Click();
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
                TakeScreenshot.takeScreenshotAs(driver, "register");
            }
        }
        public void TrimData()
        {
            if (Name == null)
            {
                Name = "";
            }

            if (Password == null)
            {
                Password = "";
            }

            if (EmailId == null)
            {
                EmailId = "";
            }

            if (MobileNo == null)
            {
                MobileNo = "";
            }

            if (DateFormat == null)
            {
                DateFormat = "";
            }

            if (AmountFormat == null)
            {
                AmountFormat = "";
            }

            if (Remarks == null)
            {
                Remarks = "";
            }


            MobileAppToken = MobileAppToken == null ? "" : MobileAppToken.Trim();

            Name     = Name.Trim();
            Password = Password.Trim();
            EmailId  = EmailId.Trim().ToLower();
            MobileNo = MobileNo.Trim().ToUpper();

            if (DateFormat == "")
            {
                DateFormat = "MMM dd, yyyy";
            }

            if (PageSize <= 0)
            {
                PageSize = 10;
            }

            if (AmountFormat == "")
            {
                AmountFormat = "0.00";
            }
        }
Exemplo n.º 5
0
        public override int GetHashCode()
        {
            var hashCode = 1230688051;

            hashCode = hashCode * -1521134295 + EmailId.GetHashCode();
            hashCode = hashCode * -1521134295 + PartId.GetHashCode();
            return(hashCode);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Function called to search the model
        /// for availability of the specified string.
        /// </summary>
        /// <param name="str">The search string</param>
        /// <returns>True, if the string is contained in the model, else false</returns>
        public override bool Contains(string str)
        {
            String status          = IsActive ? "Active" : "Inactive";
            String reportExecution = CanExecuteReport ? "Yes" : "No";

            return((EmailId != null && EmailId.StartsWith(str, StringComparison.CurrentCultureIgnoreCase)) ||
                   (UserName != null && UserName.StartsWith(str, StringComparison.CurrentCultureIgnoreCase)) ||
                   (UserType != null && UserType.StartsWith(str, StringComparison.CurrentCultureIgnoreCase)) ||
                   (status.StartsWith(str, StringComparison.CurrentCultureIgnoreCase)) ||
                   (reportExecution.StartsWith(str, StringComparison.CurrentCultureIgnoreCase)));
        }
        public void Login(string email, string password)
        {
            bool isloginreqd = SeleniumHelper.IsElementPresent(_driver, By.Id("email"), TimeSpan.FromSeconds(7));

            if (isloginreqd)
            {
                EmailId.Clear();
                EmailId.SendKeys(email);
                Password.Clear();
                Password.SendKeys(password);
                SignIn.Click();
            }
        }
Exemplo n.º 8
0
        public void edit_customer(string field_to_change, string add, string city, string state, string pin, string mobile, string email)
        {
            // DatabaseConnectorFixture db = new DatabaseConnectorFixture();
            // values=db.executeQuery(query);
            try
            {
                if (field_to_change.Equals("address"))
                {
                    Address.Clear();
                    Address.SendKeys(add);
                }
                if (field_to_change.Equals("city"))
                {
                    City.Clear();
                    City.SendKeys(city);
                }
                if (field_to_change.Equals("state"))
                {
                    State.Clear();
                    State.SendKeys(state);
                }
                if (field_to_change.Equals("pin"))
                {
                    PinNo.Clear();
                    PinNo.SendKeys(pin);
                }
                if (field_to_change.Equals("mobile"))
                {
                    TelephoneNo.Clear();
                    TelephoneNo.SendKeys(mobile);
                }
                if (field_to_change.Equals("email"))
                {
                    EmailId.Clear();
                    EmailId.SendKeys(email);
                }

                IJavaScriptExecutor js = (IJavaScriptExecutor)driver;
                js.ExecuteScript("window.scrollTo(0, document.body.scrollHeight);");
                // Assert.Equal("dfdg", driver.Title);
                WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(20));
                wait.Until(ExpectedConditions.ElementToBeClickable(Submit)).Click();
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
                TakeScreenshot.takeScreenshotAs(driver, "edit_customer");
            }
        }
        public void TrimData()
        {
            if (Name == null)
            {
                Name = "";
            }

            if (EmailId == null)
            {
                EmailId = "";
            }

            if (MobileNo == null)
            {
                MobileNo = "";
            }

            Name     = Name.Trim();
            EmailId  = EmailId.Trim();
            MobileNo = MobileNo.Trim();
        }
Exemplo n.º 10
0
        public async void GoToEnterOtpPage()
        {
            var Toast = DependencyService.Get <IMessage>();

            try
            {
                if (string.IsNullOrEmpty(EmailId))
                {
                    Toast.LongAlert("Please enter you email address."); return;
                }
                if (!Regex.IsMatch(EmailId.Trim(), @"^((?:[a-zA-Z0-9]+)|(([a-zA-Z0-9]+(\.|\+|\-|_))+[a-zA-Z0-9]+))@(([a-zA-Z0-9]+(\.|\-))+[a-zA-Z]{2,4})$", RegexOptions.IgnoreCase))
                {
                    Toast.LongAlert("Oops, this email address doesn't look right."); return;
                }
                else
                {
                    IsBusy = true;
                    var response = await new ApiData().PostData <UserModel>("user/ForgotPassword?EmailId=" + EmailId + "&Otp=" + string.Empty, true);
                    if (response != null && response.data != null)
                    {
                        if (response.status == "Success")
                        {
                            Toast.LongAlert("We have sent an OTP to your entered email id. Please check your email inbox.");
                            var navigationParams = new NavigationParameters();
                            navigationParams.Add("FromForgetPassword", true);
                            navigationParams.Add("Email_Id", EmailId);
                            await NavigationService.NavigateAsync("EnterOtpPage", navigationParams);
                        }
                    }
                    else
                    {
                        Toast.LongAlert(response.message);
                    }
                    IsBusy = false;
                }
            }
            catch (Exception e)
            {
            }
        }
Exemplo n.º 11
0
 public Email(string messageId, uint mailkitId, uint mailkitValidityId)
 {
     EmailId     = new EmailId(messageId, mailkitId, mailkitValidityId);
     Tags        = new List <Tag>();
     Attachments = new List <EmailAttachment>();
 }
Exemplo n.º 12
0
        protected override void Execute(CodeActivityContext executionContext)
        {
            Boolean         Logging     = EnableLogging.Get(executionContext);
            string          LogFilePath = LogFile.Get(executionContext);
            EntityReference Email       = EmailId.Get(executionContext);
            EntityReference Attachment  = AttachmentId.Get(executionContext);

            try
            {
                if (Logging)
                {
                    Log("Workflow Execution Start", LogFilePath);
                }
                // Create CRM Service in Workflow
                IWorkflowContext            context        = executionContext.GetExtension <IWorkflowContext>();
                IOrganizationServiceFactory serviceFactory = executionContext.GetExtension <IOrganizationServiceFactory>();
                IOrganizationService        service        = serviceFactory.CreateOrganizationService(context.UserId);
                if (Logging)
                {
                    Log("Retrieving Attahment", LogFilePath);
                }
                // Retrieve the Attachment from the given template
                Entity TempAttachment = service.Retrieve("annotation", Attachment.Id, new ColumnSet(true));
                if (TempAttachment != null)
                {
                    if (Logging)
                    {
                        Log("Creating New Attachment", LogFilePath);
                    }
                    // Create new Attachment under Email Activity
                    Entity NewAttachment = new Entity("activitymimeattachment");
                    if (TempAttachment.Contains("subject"))
                    {
                        NewAttachment.Attributes.Add("subject", TempAttachment["subject"]);
                    }
                    if (TempAttachment.Contains("filename"))
                    {
                        NewAttachment.Attributes.Add("filename", TempAttachment["filename"]);
                    }
                    if (TempAttachment.Contains("mimetype"))
                    {
                        NewAttachment.Attributes.Add("mimetype", TempAttachment["mimetype"]);
                    }
                    if (TempAttachment.Contains("documentbody"))
                    {
                        NewAttachment.Attributes.Add("body", TempAttachment["documentbody"]);
                    }
                    NewAttachment.Attributes.Add("objectid", new EntityReference(Email.LogicalName, Email.Id));
                    NewAttachment.Attributes.Add("objecttypecode", "email");
                    NewAttachment.Attributes.Add("attachmentnumber", 1);
                    service.Create(NewAttachment);
                    if (Logging)
                    {
                        Log("New Attachment Added To Email", LogFilePath);
                    }
                }
                else
                {
                    if (Logging)
                    {
                        Log("Temp Attachment doesnot exist", LogFilePath);
                    }
                }
                if (Logging)
                {
                    Log("Workflow Executed Successfully", LogFilePath);
                }
            }
            catch (Exception ex)
            {
                Log(ex.Message, LogFilePath);
            }
        }
Exemplo n.º 13
0
 private void Name_Completed(object sender, EventArgs e)
 {
     EmailId.Focus();
 }
Exemplo n.º 14
0
        public void Update()
        {
            string        strsql        = "update JobSeeker set " + "TitleId= " + TitleId + ", " + "FirstName= '" + FirstName.Replace("'", "''") + "', " + "LastName= '" + LastName.Replace("'", "''") + "', " + "EmailId= '" + EmailId.Replace("'", "''") + "', " + "Status= '" + Status.Replace("'", "''") + "' " + " where ID =" + Id;
            SqlConnection ObjConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["MyJobPortal"].ConnectionString);

            ObjConnection.Open();
            SqlCommand ObjCommand = new SqlCommand(strsql, ObjConnection);

            ObjCommand.ExecuteNonQuery();
            ObjConnection.Dispose();
            ObjCommand.Dispose();
        }
 private void ContectNo_Completed(object sender, EventArgs e)
 {
     EmailId.Focus();
 }
Exemplo n.º 16
0
 public void EditPackageBusinessEmailId()
 {
     EmailId.Clear();
     EmailId.SendKeys(ExcelOperation.GetData[2]);
 }
 public override string GetGroupKey()
 {
     return(base.GetGroupKey() + EmailId.ToString());
 }
Exemplo n.º 18
0
 public EmailId_View(EmailId eid)
 {
     Email = eid.Email;
     //Aktivista = new Aktivista_Stranke_View(eid.Aktivista);
 }
Exemplo n.º 19
0
        //
        // Event and Action defiened for the click of Confirm button
        private void ConfirmButton1_Click(object sender, EventArgs e)
        {
            string ClientName;
            string EmailId;
            int    Telephone;

            ClientName = ClientNameAnsTextBox1.Text;
            //
            // To check if client name is not empty
            if (ClientName == "")
            {
                MessageBox.Show("Client Name should not be empty", "I/P Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
                //
                // Bringing the focus back to discountfare passenger textbox for user edit
                ClientNameAnsTextBox1.Focus();
                ClientNameAnsTextBox1.SelectAll();
            }
            else
            {
                EmailId = EmailIDAnsTextBox1.Text;
                //
                // To check if EmailId contains @
                if (EmailId == "" || !EmailId.Contains("@"))
                {
                    MessageBox.Show("Client Email ID should be valid and not be empty", "I/P Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
                    //
                    // Bringing the focus back to discountfare passenger textbox for user edit
                    EmailIDAnsTextBox1.Focus();
                    EmailIDAnsTextBox1.SelectAll();
                }
                else
                {
                    //
                    // Try to check if telephone number is only integer but not decimal or text character
                    try
                    {
                        Telephone = int.Parse(TelephoneAnsTextBox1.Text);
                        //
                        // Setting the minimum length for telephone
                        if (TelephoneAnsTextBox1.Text.Length <= 5 || Telephone < 0)
                        {
                            MessageBox.Show("Client Telephone should be valid positive number of atleast 6 digits", "I/P Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
                            //
                            // Bringing the focus back to telephone textbox for user edit
                            TelephoneAnsTextBox1.Focus();
                            TelephoneAnsTextBox1.SelectAll();
                        }
                        else
                        {
                            if ((MessageBox.Show("Details of the transaction is below : \n\nClient : " + ClientName + "\nEmail ID : " + EmailId + "\nTelephone number : " + Telephone + "\nInvestment Amount : " + String.Format("\u20AC") + InvestmentAmount + "\nYears Selected" + YearsPlanSelected + " years \nBalance Amount : " + String.Format("\u20AC") + BalanceAmountAfterPlanSelect + "\nTransaction Number : " + TransactionNumber + "\n\nGet final confirmation from the client and click on yes", "Final Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes))
                            {
                                //
                                // Incase user want to proceed after getting final confirmation from client
                                using (TextWriter TXT = File.AppendText(FILENAME))
                                {
                                    //TXT.WriteLine("");
                                    TXT.WriteLine(TransactionNumber);
                                    TXT.WriteLine(EmailId);
                                    TXT.WriteLine(InvestmentAmount);
                                    TXT.WriteLine(BalanceAmountAfterPlanSelect);
                                    TXT.WriteLine(YearsPlanSelected);
                                    TXT.WriteLine(ClientName);
                                    TXT.WriteLine(Telephone);
                                }
                                //
                                // Message box confirming the user about the successful investment
                                MessageBox.Show("Congratulations! Your client \n" + ClientName + " investment is succesfully done", "Congratulation", MessageBoxButtons.OK, MessageBoxIcon.Information);
                                //
                                // Brings the user back for next investment and client
                                ClearButton1_Click(sender, e);
                            }
                            else
                            {
                                ClearButton1_Click(sender, e);
                            }
                        }
                    }
                    catch
                    {
                        MessageBox.Show("Telephone number should be numeric positive number only", "Application Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
                        TelephoneAnsTextBox1.Focus();
                        TelephoneAnsTextBox1.SelectAll();
                    }
                }
            }
        }
Exemplo n.º 20
0
        public void Update()
        {
            string        strsql        = "update Person set " + "TitleId= " + TitleId + ", " + "FirstName= '" + FirstName.Replace("'", "''") + "', " + "LastName= '" + LastName.Replace("'", "''") + "', " + "EmailId= '" + EmailId.Replace("'", "''") + "', " + "Password= '******'", "''") + "', " + "Role= '" + Role.Replace("'", "''") + "', " + "Status= '" + Status.Replace("'", "''") + "', " + "EnableEmail= " + Convert.ToInt32(EnableEmail) + " " + " where ID =" + Id;
            SqlConnection ObjConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["MyJobPortal"].ConnectionString);

            ObjConnection.Open();
            SqlCommand ObjCommand = new SqlCommand(strsql, ObjConnection);

            ObjCommand.ExecuteNonQuery();
            ObjConnection.Dispose();
            ObjCommand.Dispose();
        }