Esempio n. 1
0
        public async Task <Customer4A4> Get(Guid customerId)
        {
            using (var conn = new SqlConnection())
            {
                var customerData = await conn.QuerySingleOrDefaultAsync <CustomerData4A>(
                    "SELECT * FROM Customers WHERE CustomerId = @customerId",
                    new { customerId });

                var addressesData = await conn.QueryAsync <AddressData4A>(
                    "SELECT * FROM Addresses WHERE Customer",
                    new { customerId });

                var nameResult = CustomerName.Create(customerData.Title,
                                                     customerData.FirstName,
                                                     customerData.LastName);
                var dobResult        = Dob.Create(customerData.DateOfBirth);
                var idDocumentResult = IdDocument.Create(customerData.IdDocumentType,
                                                         customerData.IdDocumentNumber);

                var addresses = addressesData.Select(a => Address4A.Create(a.AddressId,
                                                                           a.HouseNoOrName,
                                                                           a.Street,
                                                                           a.City,
                                                                           a.County,
                                                                           a.PostCode,
                                                                           a.CurrentAddress).Value);

                return(new Customer4A4(customerData.CustomerId,
                                       nameResult.Value,
                                       dobResult.Value,
                                       idDocumentResult.Value,
                                       addresses));
            }
        }
Esempio n. 2
0
 GetHashCode()
 {
     return(NameFirst.GetHashCode()
            ^ NameLast.GetHashCode()
            ^ Dob.GetHashCode()
            ^ IsMarried.GetHashCode());
 }
Esempio n. 3
0
 public string this[string columnName]
 {
     get
     {
         if (columnName == "FirstName")
         {
             if (string.IsNullOrEmpty(FirstName))
             {
                 return("First Name is required");
             }
         }
         if (columnName == "LastName")
         {
             if (string.IsNullOrEmpty(LastName))
             {
                 return("Last Name is required");
             }
         }
         if (columnName == "GrandFatherName")
         {
             if (string.IsNullOrEmpty(GrandFatherName))
             {
                 return("Grand Father Name is required");
             }
         }
         if (columnName == "Dob")
         {
             if (string.IsNullOrEmpty(Dob.ToString()))
             {
                 return("Date of birth is required");
             }
         }
         return(string.Empty);
     }
 }
Esempio n. 4
0
 public User(Name name, Dob dob, PhoneNumber number, Email email, Image image)
 {
     Name    = name;
     Dob     = dob;
     Phone   = number;
     Email   = email;
     Picture = image;
 }
Esempio n. 5
0
            public override int GetHashCode()
            {
                var hashCode = 907988741;

                hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

                hashCode = hashCode * -1521134295 + Dob.GetHashCode();
                hashCode = hashCode * -1521134295 + EyeColor.GetHashCode();
                return(hashCode);
            }
Esempio n. 6
0
 public Customer4A(Guid customerId,
                   CustomerName name,
                   Dob dateOfBirth,
                   IdDocument idDocument,
                   IEnumerable <Address4A> addresses)
 {
     CustomerId  = customerId;
     Name        = name;
     DateOfBirth = dateOfBirth;
     IdDocument  = idDocument;
     Addresses   = addresses;
 }
Esempio n. 7
0
        public async Task <ActionResult <Guid> > Post([FromBody] CustomerRequest3A request)
        {
            // value objects validate their inputs
            var nameResult = CustomerName.Create(request.Title,
                                                 request.FirstName,
                                                 request.LastName);

            if (nameResult.Status == OperationStatus.ValidationFailure)
            {
                return(BadRequest(nameResult.ErrorMessages));
            }

            var dobResult = Dob.Create(request.DateOfBirth);

            if (dobResult.Status == OperationStatus.ValidationFailure)
            {
                return(BadRequest(dobResult.ErrorMessages));
            }

            var idDocumentResult = IdDocument.Create(request.IdDocumentType,
                                                     request.IdDocumentNumber);

            if (idDocumentResult.Status == OperationStatus.ValidationFailure)
            {
                return(BadRequest(idDocumentResult.ErrorMessages));
            }

            // convert request DTO to domain model
            var customer = new Customer3A(request.CustomerId,
                                          nameResult.Value,
                                          dobResult.Value,
                                          idDocumentResult.Value,
                                          request.Addresses.Select(a => new Address3A(a.HouseNoOrName,
                                                                                      a.Street,
                                                                                      a.City,
                                                                                      a.County,
                                                                                      a.PostCode,
                                                                                      a.CurrentAddress
                                                                                      )));

            // command just wrap domain model
            var response = await _mediator.Send(new CreateCustomerCommand3A(customer));

            var apiResponse = new CreateCustomerApiResponse3A(response.Value);

            if (response.Status == OperationStatus.Conflict)
            {
                return(Conflict(apiResponse));
            }

            return(Created($"/customers/customer/{apiResponse.CustomerId}", apiResponse));
        }
Esempio n. 8
0
        public Customer4A(Guid customerId,
                          CustomerName name,
                          Dob dateOfBirth,
                          IdDocument idDocument,
                          IEnumerable <Address4A> addresses,
                          IAddressRepository4A3 addressRepository) : this(customerId,
                                                                          name,
                                                                          dateOfBirth,
                                                                          idDocument,
                                                                          addresses)

        {
            _addressRepository = addressRepository;
        }
Esempio n. 9
0
        static void Main(string[] args)
        {
            Op  d = new Op(Mat.Soma);
            int s = d(10, 5);

            d = new Op(Mat.Mult);

            int m = d(10, 5);

            Dob dob = new Dob(Mat.Dob);
            int rd  = dob(15);

            Console.WriteLine("Soma: 10+5={0}, Multiplicação: 10x5={1}, Dobro de 15={2}", s, m, rd);
        }
Esempio n. 10
0
        public Customer4A4(Guid customerId,
                           CustomerName name,
                           Dob dateOfBirth,
                           IdDocument idDocument,
                           IEnumerable <Address4A> addresses)

        {
            CustomerId  = customerId;
            Name        = name;
            DateOfBirth = dateOfBirth;
            IdDocument  = idDocument;
            Addresses   = addresses;

            Commands = new List <IRequest>();
        }
Esempio n. 11
0
        /// <summary>
        /// Generates string values suitable for inclusion in a Slot for source patient information
        /// </summary>
        public IEnumerable <string> ToSourcePatientInfoValues(PatientID id)
        {
            string idValue      = (id == null) ? "" : id.ToCx();
            string nameValue    = ToXCN();
            string dateValue    = Dob == null ? "" : Dob.ToHL7Date();
            string sexValue     = Sex == null ? "" : Sex.AsString();
            string addressValue = Address == null ? "" : Address.Value.ToHL7Ad();

            yield return("PID-3|" + idValue);

            yield return("PID-5|" + nameValue);

            yield return("PID-7|" + dateValue);

            yield return("PID-8|" + sexValue);

            yield return("PID-11|" + addressValue);
        }
        public void PrintTicket()
        {
            FileStream   fs = null;
            StreamWriter sw = null;

            try
            {
                fs = new FileStream("../../../documents/ticketPrinted/ticket_" + ticketNr + ".txt", FileMode.Create, FileAccess.Write);
                sw = new StreamWriter(fs);

                sw.WriteLine("      Latitude Music Festival         ");
                sw.WriteLine("--------------------------------------");
                sw.WriteLine("Visitor name    :   " + FirstName + " " + LastName);
                sw.WriteLine("Date of birth   :   " + Dob.ToShortDateString());
                sw.WriteLine("Event account   :   " + eventAccount);
                sw.WriteLine("Ticket number   :   " + ticketNr);
                if (hasReserveCamp)
                {
                    sw.WriteLine("Camping spot    :   " + reservedSpot.SpotId);
                    if (spotCode != "")
                    {
                        sw.WriteLine("Spot code       :   " + spotCode);
                    }
                }
            }
            catch (IOException)
            {
                throw new LatitudeException("Something wrong with printing");
            }
            finally
            {
                if (sw != null)
                {
                    sw.Close();
                }
            }
        }
Esempio n. 13
0
 public void DisplayAll()
 {
     Console.WriteLine($" EmployeeId: {EmployeeId}\n First Name: { FirstName}\n Last Name: { LastName}\n Dob: { Dob.ToShortDateString()}\n Start Date: { StartDate.ToShortDateString()}\n HomeTown: { HomeTown}\n Department: {Department}\n");
 }
Esempio n. 14
0
        public EA_POM Edit_Enrolment()
        {
            Web_Driver.ngWebDriver.WaitForAngular();
            //Getting Records
            Edit_Record_Previous = Edit_Record.Text;
            Console.WriteLine(Edit_Record_Previous + "Previous Record");
            Edit_Id = Search_Record_Colums.Text;
            Console.WriteLine(Edit_Id + "Id");
            Edit_En_btn.Click();
            Web_Driver.ngWebDriver.WaitForAngular();
            //  Plan_Edit_Btn.Click();
            //Getting Text of previous Fields
            Plan_Edit_strng = Plan_Edit_Text.Text;
            Console.WriteLine(Plan_Edit_strng);
            //Getting First Name
            Name_strng = Name.GetAttribute("value");
            Console.WriteLine(Name_strng);
            Name.Clear();
            Name.SendKeys("Ali");
            //Getting New Values
            Name_strng1 = Name.GetAttribute("value");
            Console.WriteLine(Name_strng1);
            //Getting Last Name
            LName_strng = LName.GetAttribute("value");
            Console.WriteLine(LName_strng);
            LName.Clear();
            LName.SendKeys("Asad");
            //Getting new Values
            LName_strng1 = LName.GetAttribute("value");
            Console.WriteLine(LName_strng1);
            //Getting MidName
            MName_strng = MName.GetAttribute("value");
            Console.WriteLine(MName_strng);
            MName.Clear();
            MName.SendKeys("Asa");
            //Getting new Values
            MName_strng1 = MName.GetAttribute("value");
            Console.WriteLine(MName_strng1);
            //Getting Date of Birth
            Dob_strng = Dob.GetAttribute("value");
            Console.WriteLine(Dob_strng);
            Dob.Clear();
            Dob.SendKeys("10/11/2022");
            //Getting new Values
            Dob_strng1 = Dob.GetAttribute("value");
            Console.WriteLine(Dob_strng1);
            //Radio btn
            male_radio = Radio_M_F.ElementAt(0).GetAttribute("value");
            Console.WriteLine(male_radio);
            Radio_M_F.ElementAt(1).Click();
            Fee_Male_radio = Radio_M_F.ElementAt(1).GetAttribute("value");
            Console.WriteLine(Fee_Male_radio);
            //Phone number
            Hphone_strng = Hphone.GetAttribute("value");
            Console.WriteLine(Hphone_strng);
            Hphone.Clear();
            Hphone.SendKeys("9878564598");
            Hpnone1_strng = Hphone.GetAttribute("value");
            Console.WriteLine(Hpnone1_strng);
            //Permanent address
            P_Address_strng = P_Address.GetAttribute("value");
            Console.WriteLine(P_Address_strng);
            //New Values
            P_Address.Clear();
            P_Address.SendKeys("878# Street no5");
            P_Address_strng1 = P_Address.GetAttribute("value");
            Console.WriteLine(P_Address_strng1);
            //Permanent City
            P_City_Strng = P_City.GetAttribute("value");
            Console.WriteLine(P_City_Strng);
            //New Values
            P_City.Clear();
            P_City.SendKeys("Karachi");
            P_City_Strng1 = P_City.GetAttribute("value");
            Console.WriteLine(P_City_Strng1);
            //Permanent County
            P_County_Strng = P_County.GetAttribute("value");
            Console.WriteLine(P_County_Strng);
            //New Values
            P_County.Clear();
            P_County.SendKeys("County");
            P_County_Strng1 = P_County.GetAttribute("value");
            Console.WriteLine(P_County_Strng1);
            //Permanent State
            P_State_Strng = P_State.GetAttribute("value");
            Console.WriteLine(P_State_Strng);
            //New Values
            P_State.Clear();
            P_State.SendKeys("USA");
            P_State_Strng1 = P_State.GetAttribute("value");
            Console.WriteLine(P_State_Strng1);
            //ZipCode
            P_Zip_Strng = P_Zip.GetAttribute("value");
            Console.WriteLine(P_Zip_Strng);
            //New Values
            P_Zip.Clear();
            P_Zip.SendKeys("453454");
            P_Zip_Strng1 = P_Zip.GetAttribute("value");
            Console.WriteLine(P_Zip_Strng1);
            //MD_Number
            Md_No_strng = MD_Number.GetAttribute("value");
            Console.WriteLine(Md_No_strng);
            //New Values
            MD_Number.Clear();
            MD_Number.SendKeys("MD_9001");
            Md_No_strng1 = P_Zip.GetAttribute("value");
            Console.WriteLine(Md_No_strng1);
            //Email Address
            Email_Strng = Email_Adress.GetAttribute("value");
            Console.WriteLine(Email_Strng);
            //New Values
            Email_Adress.Clear();
            Email_Adress.SendKeys("*****@*****.**");
            Email_Strng = Email_Adress.GetAttribute("value");
            Console.WriteLine(Email_Strng1);
            //Pay List testing unchecked CheckBox


            Paylist_bool1 = Paylist.ElementAt(0).Selected;
            Paylist_bool2 = Paylist.ElementAt(1).Selected;
            Paylist_bool3 = Paylist.ElementAt(2).Selected;
            if (Paylist_bool1 == true || Paylist_bool2 == true || Paylist_bool3 == true)
            {
                if (Paylist_bool1 == true)
                {
                    Paylist.ElementAt(0).Click();
                }
                if (Paylist_bool2 == true)
                {
                    Paylist.ElementAt(1).Click();
                }
                if (Paylist_bool3 == true)
                {
                    Paylist.ElementAt(2).Click();
                }
                Asserts.Pay_list1(true);
            }

            if (Paylist_bool1 == false && Paylist_bool2 == false & Paylist_bool3 == false)
            {
                Asserts.Pay_list1(true);
            }
            //cliking on single paylist
            Paylist.ElementAt(0).Click();
            Paylist_bool1 = Paylist.ElementAt(0).Selected;
            Paylist_bool2 = Paylist.ElementAt(1).Selected;
            Paylist_bool3 = Paylist.ElementAt(2).Selected;
            if (Paylist_bool1 == true && Paylist_bool2 == false & Paylist_bool3 == false)
            {
                Asserts.Pay_list(Paylist_bool1);
            }
            else
            {
                Asserts.Pay_list(false);
            }
            //Asertion for Records inrequired fields are changed or not
            if (Name_strng != Name_strng1 && LName_strng != LName_strng1 && MName_strng != MName_strng1 && Dob_strng != Dob_strng1 && P_Address_strng != P_Address_strng1 && P_City_Strng != P_City_Strng1 && P_State_Strng != P_State_Strng1 && male_radio != Fee_Male_radio && Md_No_strng != Md_No_strng1 && Email_Strng != Email_Strng1)
            {
                Asserts.En_Search_Create_pages_Fields_Edit(true);
            }
            else
            {
                Asserts.En_Search_Create_pages_Fields_Edit(false);
            }
            //Save Draft
            Console.WriteLine("Colorsss");

            Save_Draft_Btn_Color = SaveDraft.ElementAt(0).GetCssValue("background-color");
            Console.WriteLine(Save_Draft_Btn_Color + "Color");
            Enroment_create_page_Url = Web_Driver.driver.Url;
            Console.WriteLine(Enroment_create_page_Url);
            SaveDraft.ElementAt(0).Click();


            Save_Draft_Btn_Color1 = SaveDraft.ElementAt(0).GetCssValue("background-color");
            Console.WriteLine(Save_Draft_Btn_Color1 + "Color-");
            //Draft Button cliking verifying

            Asserts.Save_Draft(Save_Draft_Btn_Color, Save_Draft_Btn_Color1);
            Web_Driver.ngWebDriver.WaitForAngular();
            Web_Driver.driver.Navigate().Refresh();


            Enroment_Search_page_Url = Web_Driver.driver.Url;

            Console.WriteLine(Enroment_Search_page_Url);
            Asserts.En_Search_Create_pages_Url(Enroment_create_page_Url, Enroment_Search_page_Url);
            //Getting New Record
            Web_Driver.ngWebDriver.WaitForAngular();


            //Search for Updated Enrolment
            Thread.Sleep(3000);
            Hash_Drop.ElementAt(0).Click();
            //Search by Id
            Search_Records.ElementAt(0).Click();
            Thread.Sleep(3000);

            Search_Records.ElementAt(0).SendKeys(Edit_Id);

            Thread.Sleep(3000);

            Search_btn.ElementAt(0).Click();
            Thread.Sleep(3000);
            //Getting text of updated record
            Edit_Record_Updated = Edit_Record.Text;
            Console.WriteLine(Edit_Record_Updated + " Updated Record");
            //Assertion For Edit Record check
            Asserts.Edit_Record_Update(Edit_Record_Previous, Edit_Record_Updated);
            return(new EA_POM());
        }
Esempio n. 15
0
 public void SetDob(Dob input)
 {
     this.dobBirth = input;
 }
Esempio n. 16
0
 public bool HasType(TransferDataType typeId)
 {
     return(Dob.GetFormats().Any(t => t.ToLower() == typeId.Id.ToLower()));
 }
Esempio n. 17
0
 public override string ToString()
 {
     return($"{FName}    ({Dob.ToLongDateString()})");
 }
Esempio n. 18
0
 public override string ToString()
 {
     return(String.Format("{0},{1},{2},{3},{4}", Id, FirstName, LastName, Dob.ToString(), CurrentSity));
 }
Esempio n. 19
0
        //var model = new ValidationViewModel
        //modle
        public string this[string columnName]
        {
            get
            {
                string result = null;
                if (columnName == "FirstName")
                {
                    if (string.IsNullOrEmpty(FirstName))
                    {
                        result = "FirstName is a mandatory field!";
                    }
                }
                if (columnName == "LastName")
                {
                    if (string.IsNullOrEmpty(LastName))
                    {
                        result = "LastName is a mandatory field!";
                    }
                }

                if (columnName == "Email")
                {
                    if (string.IsNullOrEmpty(Email))
                    {
                        result = "Email a mandatory field!";
                    }
                    else if (!EmailValidation.IsValidEmailAddress(Email))
                    {
                        result = "The emails address is not valid!!";
                    }
                }

                if (columnName == "Phone")
                {
                    if (string.IsNullOrEmpty(Phone))
                    {
                        result = "Phone is a mandatory field!";
                    }
                }

                if (columnName == "Dob")
                {
                    DateTime hundredYearsPast = DateTime.Now.AddYears(-100);

                    if (Dob.Equals(null))
                    {
                        result = "Dob is a mandatory field!";
                    }

                    else if (Dob.CompareTo(DateTime.Now) > 0)
                    {
                        result = "Dob should be in the past!";
                    }
                    //else if(DateTime.Compare(hundredYearsPast, DateTime.Now.AddYears(-100))< 1)
                    else if (Dob < hundredYearsPast)
                    {
                        result = "Dob not should be in the 100+ years past";
                    }
                }

                if (columnName == "WorkDate")
                {
                    DateTime tenYearsPast = DateTime.Now.AddYears(-10);

                    if (WorkDate.Equals(null))
                    {
                        result = "WorkDate is a mandatory field!";
                    }

                    else if (WorkDate.CompareTo(DateTime.Now) >= 0)
                    {
                        result = "WorkDate should be in the past or Today!";
                    }
                    //else if(DateTime.Compare(hundredYearsPast, DateTime.Now.AddYears(-100))< 1)
                    else if (WorkDate < tenYearsPast)
                    {
                        result = "WorkDate should not be in 10+ year past";
                    }
                }

                if (columnName == "Hours")
                {
                    if (Hours <= 0 || Hours > 24)
                    {
                        result = "Hours must be between 0 and 24";
                    }
                }

                if (columnName == "BeginDate")
                {
                    DateTime tenYearsPast = DateTime.Now.AddYears(-10);

                    if (BeginDate.Equals(null))
                    {
                        result = "BeginDate is a mandatory field to Calculate TotalHours for the period!";
                    }

                    else if (BeginDate.CompareTo(DateTime.Now) >= 0)
                    {
                        result = "BeginDate should be in the past or Today!";
                    }
                    //else if(DateTime.Compare(hundredYearsPast, DateTime.Now.AddYears(-100))< 1)
                    else if (BeginDate < tenYearsPast)
                    {
                        result = "BeginDate should not be in 10+ year past";
                    }
                }

                if (columnName == "EndDate")
                {
                    DateTime tenYearsPast = DateTime.Now.AddYears(-10);

                    if (EndDate.Equals(null))
                    {
                        result = "EndDate is a mandatory field to Calculate TotalHours for the period!";
                    }

                    else if (EndDate.CompareTo(DateTime.Now) >= 0)
                    {
                        result = "EndDate should be in the past or Today!";
                    }
                    //else if(DateTime.Compare(hundredYearsPast, DateTime.Now.AddYears(-100))< 1)
                    else if (EndDate < tenYearsPast)
                    {
                        result = "EndDate should not be in 10+ year past";
                    }
                }

                return(result);
            }
        }
Esempio n. 20
0
 public override void ShowRecord()
 {
     Console.WriteLine("Patient Record Details:\nSurname: {0}\nFirst Name: {1}\nDoB: {2}\nAddress: {3}\nContact Number: {4}\n\nEnd of Patient Record\n\n", Surname, FirstName, Dob.ToString("dd/MM/yy"), Address, contactnumber.ToString());
 }
Esempio n. 21
0
        public override void updateDetails(int custID)
        {
            dbcon = new DatabaseConnector();
            Cid   = custID;

            dbcon.OpenConnection();

            //insert into tbl_nm(db FIELDS) VALUES(variables)
            //convert date to enter format
            dbcon.InitSqlCommand("UPDATE customer SET fname='" + Fname + "',lname='" + Lname + "',nic='" + Nic + "',gender='" + Gender + "',dob='" + Dob.ToString("yyyy-MM-dd") + "',address1='" + Add1 + "',address2='" + Add2 + "',phone='" + Phone + "',mail='" + Email + "' WHERE cid='" + Cid + "'").ExecuteNonQuery();

            dbcon.CloseConnection();
        }
Esempio n. 22
0
        public EA_POM Create_Enrolment()
        {
            Thread.Sleep(3000);
            //   string[] vals = new string[] { "H7607-002-001", "H7607-002-002", "H7607-002-003", "H7607-003-001", "H7607-003-002", "H7607-003-003" };
            En_Tab_Click.Click();
            Thread.Sleep(3000);
            Pre_Id = Previous_ID_txt.ElementAt(0).Text;
            int.TryParse(Pre_Id, out Previous_ID);
            Create_En_btn.Click();
            Url_Creat_En_page = Web_Driver.driver.Url;
            Asserts.Url_Create_En(Url_Creat_En_page, Url_En_page);
            Console.WriteLine(Url_Creat_En_page);
            Console.WriteLine(Url_En_page);
            //Plan radio button verifying
            for (int i = 0; i < Plan_Radio_btn.Count; i++)
            {
                try
                {
                    Plan_Radio_btn.ElementAt(i).Click();
                    radio = Plan_Radio_btn.ElementAt(i).Selected;
                    if (radio = Plan_Radio_btn.ElementAt(i).Selected)
                    {
                        //  Console.WriteLine(Plan_Radio_btn.ElementAt(i).Selected + "Button  clicked");
                        Asserts.Assert_Radiobtn(radio);
                    }
                }
                catch
                {
                    Asserts.Assert_Radiobtn(false);
                }
            }
            // List<string> list = new List<string>();
            IList <IWebElement> rows = Web_Driver.driver.FindElements(By.XPath("//table[@class='table-responsive table-bordered']//tbody//tr"));

            for (int i = 3; i < 6; i++)
            {
                // Console.WriteLine(rows[i].Text);
                if (rows[i].Text == "H7607-002-001 Los Angeles" || rows[i].Text == "H7607-002-002 Orange" || rows[i].Text == "H7607-002-003 San Diego")
                {
                    // Console.WriteLine(rows[i].Text);
                    bool txtverified = true;
                    Asserts.Assert_Plans(txtverified);
                }
                else
                {
                    bool txtverified = false;
                    Asserts.Assert_Plans(txtverified);
                }
                for (int j = 7; j < 10; j++)
                {
                    //Console.WriteLine(rows[i].Text);
                    if (rows[j].Text == "H7607-003-001 Los Angeles" || rows[j].Text == "H7607-003-002 Orange" || rows[j].Text == "H7607-003-003 San Diego")
                    {
                        //  Console.WriteLine(rows[j].Text);
                        bool txtverified = true;
                        Asserts.Assert_Plans1(txtverified);
                    }
                    else
                    {
                        bool txtverified = false;
                        Asserts.Assert_Plans1(txtverified);
                    }
                }
            }



            //First name verified
            Name.SendKeys("Usama");


            //Last name verified
            LName.SendKeys("Sohail");


            //Middle name verified

            MName.SendKeys("Puma");



            //Required Date Of Birth verified
            Dob.SendKeys("05/07/2020");

            //Sex Male/FeeMale radio btns
            for (int i = 0; i < Radio_M_F.Count; i++)
            {
                try
                {
                    Radio_M_F.ElementAt(i).Click();
                    radio_1 = Radio_M_F.ElementAt(i).Selected;
                    if (radio_1 = Radio_M_F.ElementAt(i).Selected)
                    {
                        Console.WriteLine(Radio_M_F.ElementAt(i).Selected + "Button is  clicked");
                        Asserts.Assert_Radiobtn(radio_1);
                    }
                }
                catch
                {
                    Asserts.Assert_Radiobtn(false);
                }
            }
            /// Entring Home Phone
            Hphone.SendKeys("5672348791");
            //Entering Permanent Address
            P_Address.SendKeys("72 Health center");
            //Entering Permanent City
            P_City.SendKeys("Lahore");
            //Entering Permanent County
            P_County.SendKeys("Pak");
            //Entering Permanent State
            P_State.SendKeys("Pakistan");
            //Entering Permanent Zip
            P_Zip.SendKeys("315550");
            //Mailing Adress CheckBox
            Mailing_Adress.Click();
            checkbox = Mailing_Adress.Selected;
            if (checkbox == true)
            {
                Asserts.Mailing_Checkbox(true);
            }
            else
            {
                Asserts.Mailing_Checkbox(false);
            }

            //Entering data into street address input box

            Street_Adress.SendKeys("72 Health center street No 10");
            //Entering data into Mailing City

            Mailing_City.SendKeys("Faisalabad");
            //Entering data into Mailing State

            Mailing_State.SendKeys("England");
            //Entering data into Mailing Zipcode

            Mailing_Zip.SendKeys("4532678");
            //Entering data into MdNumber

            MD_Number.SendKeys("Md-9999");
            //Entering data into AttorneName
            AttorneyName.SendKeys("Gul");
            //Entering data into AttorneAdree
            AttorneyAddress.SendKeys("123 street near new clonoy 1");
            //Entering data into Attorny Phone
            AttorneyPhone.SendKeys("2324445787");
            //Entering data into Attorny Phone
            Attorneyrelation.SendKeys("Cousin");
            for (int i = 0; i < Section_2_Checkbox2.Count; i++)
            {
                try
                {
                    Section_2_Checkbox2.ElementAt(i).Click();
                    Section_2_checked1 = Section_2_Checkbox2.ElementAt(i).Selected;
                    if (Section_2_checked1 = Section_2_Checkbox2.ElementAt(i).Selected)
                    {
                        Console.WriteLine(Section_2_Checkbox2.ElementAt(i).Selected + "Section 2 Button not clicked");
                        Asserts.Section2_Checkbox(Section_2_checked1);
                    }
                }
                catch
                {
                    Asserts.Section2_Checkbox(false);
                }

                {
                }
            }
            for (int i = 0; i < Section_2_Checkbox.Count; i++)
            {
                try
                {
                    Section_2_Checkbox.ElementAt(i).Click();
                    Section_2_checked = Section_2_Checkbox.ElementAt(i).Selected;
                    if (Section_2_checked = Section_2_Checkbox.ElementAt(i).Selected)
                    {
                        Console.WriteLine(Section_2_Checkbox.ElementAt(i).Selected + "Button not clicked");
                        Asserts.Assert_Radiobtn(Section_2_checked);
                    }
                }
                catch
                {
                    Asserts.Assert_Radiobtn(false);
                }

                {
                }
            }
            //Entring email address
            Email_Adress.SendKeys("*****@*****.**");
            Premium_check.Click();
            premium = Premium_check.Selected;
            if (premium == true)
            {
                Asserts.Section2_Checkbox(true);
            }
            else
            {
                Asserts.Section2_Checkbox(false);
            }
            for (int i = 0; i < Attestation.Count; i++)
            {
                try
                {
                    Attestation.ElementAt(i).Click();
                    radio_2 = Attestation.ElementAt(i).Selected;
                    if (radio_2 == true)
                    {
                        Console.WriteLine(Attestation.ElementAt(i).Selected + "Attestation Radio Button  clicked");
                        Asserts.Assert_Radiobtn(radio_2);
                    }
                }
                catch
                {
                    Asserts.Assert_Radiobtn(false);
                }

                Genrete_Enrolment.ElementAt(1).Click();
                Web_Driver.ngWebDriver.WaitForAngular();
                Genrete_Enrolment_Yes_Btn.ElementAt(1).Click();
                Web_Driver.ngWebDriver.WaitForAngular();
                Genrete_Appoinment_Ok_Btn.ElementAt(1).Click();
                Web_Driver.ngWebDriver.WaitForAngular();
                Web_Driver.driver.Navigate().Refresh();
                Web_Driver.ngWebDriver.WaitForAngular();
                Up_Id = Created_ID_txt.ElementAt(0).Text;
                int.TryParse(Up_Id, out Updated_ID);
                Asserts.ID_Compare(Updated_ID, Previous_ID);
                Console.WriteLine(Previous_ID);
                Console.WriteLine(Updated_ID);
            }
            return(new EA_POM());
        }
Esempio n. 23
0
 public override string ToString()
 {
     return(Name + " " + Dob.ToString("yyyy.MM.dd"));
 }
Esempio n. 24
0
 public bool FindDob(string s)                 //It compares the name passed in the arguments with name in the object and returns true if found
 {
     return(Dob.ToLower().Equals(s.ToLower()));
 }
Esempio n. 25
0
 //  public int SerialNo { get; set; } = 123;
 public override string ToString()
 {
     return($"{"Dto:",-9}{"FirstName=",-10}{FirstName,-10}LastName = {LastName,-6}Dob={Dob.ToShortDateString()} {"RecordNumber = ",-15}{RecordNumber}");
 }
Esempio n. 26
0
 // public string SerialNo { get; set; } = "Abc";
 public override string ToString()
 {
     return($"{"Student:",-9}{"ForeName=",-10}{ForeName,-10}LastName = {LastName,-6}Dob={Dob.ToShortDateString()} {"Id = ",-15}{Id}");
 }