Esempio n. 1
0
        private void btnclick(object sender, EventArgs e)
        {
            Rc = new RegistrationClass();
            Rc.CreateDatabaseBook();
            String           t   = C_id.ToString();
            List <CLocation> res = Rc.SelectBookedLocation(t);
            List <CLocation> k   = Rc.SelectTableLocation();
            int o = k.Count;

            if (res != null)
            {
                int i = res.Count;

                CLocation Loc  = res.Last();
                CLocation Loc1 = res[0];

                Mssage = Loc.Message;
                Addrss = Loc.address;
            }

            RM         = new Book();
            RM.Message = Mssage;
            RM.C_id    = C_id.Text;
            RM.D_id    = D_id.Text;
            RM.Address = Addrss;
            bool r = Rc.InsertBook(RM);

            if (r)
            {
                FindViewById <TextView>(Resource.Id.textView1).Text = "Booked Successfully ! Enjoy Your Ride";
            }
        }
        public void btnclick(object sender, EventArgs e)
        {
            try
            {
                RC1 = new RegistrationClass();

                RM1             = new RegistratoinModel();
                RM1.FullName    = EName.Text;
                RM1.CompanyName = CName.Text;
                RM1.UserType    = user_type;
                RM1.Email       = Email.Text;
                RM1.Password    = Password.Text;
                RM1.Contact     = Contact.Text;
                RC1.CreateDatabase();

                bool b = RC1.InsertItem(RM1);
                if (b)
                {
                    var intent = new Intent(this, typeof(Welcome));
                    intent.PutExtra("username", EName.Text);
                    intent.PutExtra("Message", "Please Login First");


                    StartActivity(intent);
                }
            }
            catch (Exception u)
            {
                Console.Write(u.Message);
            }
        }
Esempio n. 3
0
        public void Registerclick(object sender, EventArgs e)
        {
            try
            {
                RC = new RegistrationClass();

                RM             = new RegistratoinModel();
                RM.FullName    = FullName.Text;
                RM.CompanyName = Company_Name.Text;
                RM.UserType    = user_type.Text;
                RM.Email       = Email.Text;
                RM.Password    = Password.Text;
                RC.CreateDatabase();

                bool b = RC.InsertItem(RM);
                if (b)
                {
                    var intent = new Intent(this, typeof(Login));
                    intent.PutExtra("username", user_type.Text);
                    intent.PutExtra("Message", "Please Login First");


                    StartActivity(intent);
                }
            }
            catch (Exception u)
            {
                Console.Write(u.Message);
            }
        }
Esempio n. 4
0
        private void btnclick(object sender, EventArgs e)
        {
            // Intent kfsjk = new Intent();
            //              var intent = new Intent();

            RC = new RegistrationClass();

            RM         = new Feedback();
            RM.Yname   = Yname.Text;
            RM.Cname   = Cname.Text;
            RM.Dname   = Ename.Text;
            RM.Message = Message.Text;
            RM.Rank    = rank.Text;

            RC.CreateDatabaseFeedback();

            bool b = RC.InsertFeedback(RM);

            //intent.PutExtra("succesfull!",FullName.Text)
            if (b)
            {
                var intent = new Intent(this, typeof(WCCustomer));

                StartActivity(intent);
            }
        }
Esempio n. 5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Results);
            RC = new RegistrationClass();
            List <Feedback> V = RC.SelectTableResult();

            mylist      = FindViewById <ListView>(Resource.Id.listView1);
            progressBar = FindViewById <ProgressBar>(Resource.Id.progressBar1);
            showData();
        }
Esempio n. 6
0
        private async void AddressButton1_OnClick(object sender, EventArgs e)
        {
            try
            {
                Usertype = FindViewById <TextView>(Resource.Id.Usertype);
                Email    = FindViewById <TextView>(Resource.Id.Email);
                Message  = FindViewById <TextView>(Resource.Id.Message);
                var locator = CrossGeolocator.Current;
                locator.DesiredAccuracy = 50;
                TimeSpan ts       = TimeSpan.FromTicks(10000);
                var      position = await locator.GetPositionAsync(timeout : ts);

                Geocoder        geocoder    = new Geocoder(this);
                IList <Address> addressList =
                    await geocoder.GetFromLocationAsync(position.Latitude, position.Longitude, 10);

                Address address = addressList.FirstOrDefault();
                if (address != null)
                {
                    StringBuilder deviceAddress = new StringBuilder();
                    for (int i = 0; i <= address.MaxAddressLineIndex; i++)
                    {
                        deviceAddress.AppendLine(address.GetAddressLine(i));
                    }
                    _addressText.Text = deviceAddress.ToString();

                    RC          = new RegistrationClass();
                    RM          = new CLocation();
                    RM.Email    = Email.Text;
                    RM.UserType = Usertype.Text;
                    RM.address  = deviceAddress.ToString();
                    RM.Message  = Message.Text;
                    RC.CreateDatabaseLocation();

                    bool b = RC.InsertCLocation(RM);


                    if (b)
                    {
                        FindViewById <TextView>(Resource.Id.Status).Text = "Location Saved!";
                    }
                }
                else
                {
                    _addressText.Text = "Unable to determine the address. Try again in a few minutes.";
                }
            }
            catch (Exception a) {
                Console.Write(a.Message);
            }
        }
Esempio n. 7
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.CustomerRideOption);


            RC = new RegistrationClass();
            List <CLocation> V = RC.SelectTableLocation();

            mylist      = FindViewById <ListView>(Resource.Id.listView1);
            progressBar = FindViewById <ProgressBar>(Resource.Id.progressBar1);
            showData();
        }
Esempio n. 8
0
        private void btnclick(object sender, EventArgs e)
        {
            B  = new Book();
            Rc = new RegistrationClass();
            String      t   = Et.ToString();
            List <Book> res = Rc.SelectTableBook(t);

            if (res != null)
            {
                int  y    = res.Count;
                Book temp = res.Last();
                FindViewById <TextView>(Resource.Id.textView1).Text = temp.C_id;
                FindViewById <TextView>(Resource.Id.textView2).Text = temp.Address;
                FindViewById <TextView>(Resource.Id.textView3).Text = temp.Message;
            }
        }
Esempio n. 9
0
        private void btnclick(object sender, EventArgs e)
        {
            rc = new RegistrationClass();
            string un = Email.ToString();


            List <RegistratoinModel> result = rc.SelectTable(un, pwd.ToString());

            if (result != null)
            {
                try {
                    if (usrtype.Text == "Company")
                    {
                        var intent = new Intent(this, typeof(Welcome));
                        intent.PutExtra("username", Email.Text);
                        intent.PutExtra("Usertype", usrtype.Text);
                        intent.PutExtra("pwd", pwd.Text);


                        StartActivity(intent);
                    }
                    else if (usrtype.Text == "Customer")
                    {
                        var intent = new Intent(this, typeof(WCCustomer));
                        intent.PutExtra("username", Email.Text);
                        intent.PutExtra("Usertype", usrtype.Text);
                        intent.PutExtra("pwd", pwd.Text);

                        StartActivity(intent);
                    }
                }
                catch (Exception q)
                {
                    Console.Write(q.Message);
                }
            }

            else
            {
                var intent = new Intent(this, typeof(MainActivity)).SetFlags(ActivityFlags.ClearTask);

                var intent1 = new Intent(this, typeof(MainActivity));
                intent1.PutExtra("Message", "Register Here");
                StartActivity(intent);
            }
        }