コード例 #1
0
        void ReleaseDesignerOutlets()
        {
            if (AppraisalTableView != null)
            {
                AppraisalTableView.Dispose();
                AppraisalTableView = null;
            }

            if (AppraisalTypeSegment != null)
            {
                AppraisalTypeSegment.Dispose();
                AppraisalTypeSegment = null;
            }

            if (BtnAddNew != null)
            {
                BtnAddNew.Dispose();
                BtnAddNew = null;
            }

            if (BtnCancel != null)
            {
                BtnCancel.Dispose();
                BtnCancel = null;
            }

            if (VinSearch != null)
            {
                VinSearch.Dispose();
                VinSearch = null;
            }
        }
コード例 #2
0
        void VinSearch_CancelButtonClicked(object sender, EventArgs e)
        {
            VinSearch.EndEditing(true);
            VinSearch.Text = "";

            string segmentID = AppraisalTypeSegment.SelectedSegment.ToString();

            if (segmentID == "0")
            {
                if (AppDelegate.appDelegate.CustomerLogin)
                {
                    var Appcompleted = CustomerAppLogsList.FindAll((CustomerAppraisalLogEntity obj) => obj.Status == "CA");
                    AppraisalTableView.Source             = new CustomerApprasialLogTVS(Appcompleted);
                    AppraisalTableView.RowHeight          = 120f;
                    AppraisalTableView.EstimatedRowHeight = 120.0f;
                    AppraisalTableView.BackgroundColor    = UIColor.LightGray;
                    AppraisalTableView.ReloadData();
                }
                else
                {
                    var Appcompleted = apploglist.FindAll((AppraisalLogEntity obj) => obj.Status == "CA");
                    AppraisalTableView.Source             = new ApprasialLogTVS(Appcompleted);
                    AppraisalTableView.RowHeight          = 120f;
                    AppraisalTableView.EstimatedRowHeight = 120.0f;
                    AppraisalTableView.BackgroundColor    = UIColor.LightGray;
                    AppraisalTableView.ReloadData();
                }
            }
            else
            {
                if (AppDelegate.appDelegate.CustomerLogin)
                {
                    var appPending = CustomerAppLogsList.FindAll((CustomerAppraisalLogEntity obj) => obj.Status != "CA");
                    AppraisalTableView.Source             = new CustomerApprasialLogTVS(appPending);
                    AppraisalTableView.RowHeight          = 120f;
                    AppraisalTableView.EstimatedRowHeight = 120.0f;
                    AppraisalTableView.BackgroundColor    = UIColor.LightGray;
                    AppraisalTableView.ReloadData();
                }
                else
                {
                    var appPending = apploglist.FindAll((AppraisalLogEntity obj) => obj.Status != "CA");
                    AppraisalTableView.Source             = new ApprasialLogTVS(appPending);
                    AppraisalTableView.RowHeight          = 120f;
                    AppraisalTableView.EstimatedRowHeight = 120.0f;
                    AppraisalTableView.BackgroundColor    = UIColor.LightGray;
                    AppraisalTableView.ReloadData();
                }
            }
        }
コード例 #3
0
        partial void Segment_Changed(UISegmentedControl sender)
        {
            string segmentID = AppraisalTypeSegment.SelectedSegment.ToString();

            if (segmentID == "0")
            {
                if (AppDelegate.appDelegate.CustomerLogin)
                {
                    var completedVehicle = CustomerAppLogsList.FindAll((CustomerAppraisalLogEntity obj) => obj.Status == "CA");
                    AppraisalTableView.Source             = new CustomerApprasialLogTVS(completedVehicle);
                    AppraisalTableView.RowHeight          = 120f;
                    AppraisalTableView.EstimatedRowHeight = 120.0f;
                    AppraisalTableView.BackgroundColor    = UIColor.LightGray;
                    AppraisalTableView.ReloadData();
                }
                else
                {
                    var completedVehicle = apploglist.FindAll((AppraisalLogEntity obj) => obj.Status == "CA");
                    AppraisalTableView.Source             = new ApprasialLogTVS(completedVehicle);
                    AppraisalTableView.RowHeight          = 120f;
                    AppraisalTableView.EstimatedRowHeight = 120.0f;
                    AppraisalTableView.BackgroundColor    = UIColor.LightGray;
                    AppraisalTableView.ReloadData();
                }
            }
            else
            {
                if (AppDelegate.appDelegate.CustomerLogin)
                {
                    var completedVehicle = CustomerAppLogsList.FindAll((CustomerAppraisalLogEntity obj) => obj.Status != "CA");
                    AppraisalTableView.Source             = new CustomerApprasialLogTVS(completedVehicle);
                    AppraisalTableView.RowHeight          = 120f;
                    AppraisalTableView.EstimatedRowHeight = 120.0f;
                    AppraisalTableView.BackgroundColor    = UIColor.LightGray;
                    AppraisalTableView.ReloadData();
                }
                else
                {
                    var completedVehicle = apploglist.FindAll((AppraisalLogEntity obj) => obj.Status != "CA");
                    AppraisalTableView.Source             = new ApprasialLogTVS(completedVehicle);
                    AppraisalTableView.RowHeight          = 120f;
                    AppraisalTableView.EstimatedRowHeight = 120.0f;
                    AppraisalTableView.BackgroundColor    = UIColor.LightGray;
                    AppraisalTableView.ReloadData();
                }
            }
        }
コード例 #4
0
        async public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            NSNotificationCenter.DefaultCenter.AddObserver((Foundation.NSString) "ShowPushNotifyData", ShowAPNSView);
            NSNotificationCenter.DefaultCenter.AddObserver((Foundation.NSString) "ShowPushNotifyAppLog", ShowAPNSView);

            // hide keyboard on touch outside area
            var g = new UITapGestureRecognizer(() => View.EndEditing(true));

            g.CancelsTouchesInView = false; //for iOS5
            View.AddGestureRecognizer(g);

            VinSearch.Text         = VinSearch.Text.ToUpper();
            VinSearch.TextChanged += (sender, e) =>
            {
                if (AppDelegate.appDelegate.CustomerLogin)
                {
                    if (VinSearch.Text.Length > 0)
                    {
                        var VinSearchEntity = CustomerAppLogsList.FindAll((CustomerAppraisalLogEntity obj) => obj.VIN.Contains(VinSearch.Text.Trim()));
                        AppraisalTableView.Source             = new CustomerApprasialLogTVS(VinSearchEntity);
                        AppraisalTableView.RowHeight          = 120f;
                        AppraisalTableView.EstimatedRowHeight = 120.0f;
                        AppraisalTableView.BackgroundColor    = UIColor.LightGray;
                        AppraisalTableView.ReloadData();
                    }//Method get called when search started
                    else
                    {
                        string segmentID = AppraisalTypeSegment.SelectedSegment.ToString();
                        if (segmentID == "0")
                        {
                            var Appcompleted = CustomerAppLogsList.FindAll((CustomerAppraisalLogEntity obj) => obj.Status == "CA");
                            AppraisalTableView.Source             = new CustomerApprasialLogTVS(Appcompleted);
                            AppraisalTableView.RowHeight          = 120f;
                            AppraisalTableView.EstimatedRowHeight = 120.0f;
                            AppraisalTableView.BackgroundColor    = UIColor.LightGray;
                            AppraisalTableView.ReloadData();
                        }
                        else
                        {
                            var appPending = CustomerAppLogsList.FindAll((CustomerAppraisalLogEntity obj) => obj.Status != "CA");
                            AppraisalTableView.Source             = new CustomerApprasialLogTVS(appPending);
                            AppraisalTableView.RowHeight          = 120f;
                            AppraisalTableView.EstimatedRowHeight = 120.0f;
                            AppraisalTableView.BackgroundColor    = UIColor.LightGray;
                            AppraisalTableView.ReloadData();
                        }
                    }
                }
                else
                {
                    if (VinSearch.Text.Length > 0)
                    {
                        var VinSearchEntity = apploglist.FindAll((AppraisalLogEntity obj) => obj.VIN.Contains(VinSearch.Text.Trim()));
                        AppraisalTableView.Source             = new ApprasialLogTVS(VinSearchEntity);
                        AppraisalTableView.RowHeight          = 120f;
                        AppraisalTableView.EstimatedRowHeight = 120.0f;
                        AppraisalTableView.BackgroundColor    = UIColor.LightGray;
                        AppraisalTableView.ReloadData();
                    }//Method get called when search started
                    else
                    {
                        string segmentID = AppraisalTypeSegment.SelectedSegment.ToString();
                        if (segmentID == "0")
                        {
                            var Appcompleted = apploglist.FindAll((AppraisalLogEntity obj) => obj.Status == "CA");
                            AppraisalTableView.Source             = new ApprasialLogTVS(Appcompleted);
                            AppraisalTableView.RowHeight          = 120f;
                            AppraisalTableView.EstimatedRowHeight = 120.0f;
                            AppraisalTableView.BackgroundColor    = UIColor.LightGray;
                            AppraisalTableView.ReloadData();
                        }
                        else
                        {
                            var appPending = apploglist.FindAll((AppraisalLogEntity obj) => obj.Status != "CA");
                            AppraisalTableView.Source             = new ApprasialLogTVS(appPending);
                            AppraisalTableView.RowHeight          = 120f;
                            AppraisalTableView.EstimatedRowHeight = 120.0f;
                            AppraisalTableView.BackgroundColor    = UIColor.LightGray;
                            AppraisalTableView.ReloadData();
                        }
                    }
                }
            };

            VinSearch.ShouldBeginEditing  += VinSearch_ShouldBeginEditing;
            VinSearch.ShouldEndEditing    += VinSearch_ShouldEndEditing;
            VinSearch.CancelButtonClicked += VinSearch_CancelButtonClicked;
            VinSearch.TintColor            = UIColor.FromRGB(95, 135, 95);

            AppraisalTableView.TableFooterView = new UIView(new CGRect(0, 0, 0, 0));

            AppraisalTableView.RowHeight          = 120f;
            AppraisalTableView.EstimatedRowHeight = 120.0f;
            AppraisalTableView.BackgroundColor    = UIColor.LightGray;

            GetCustomerLoginRecords();
            GetDealerLoginRecords();

            if (AppDelegate.appDelegate.CustomerLogin)
            {
                if (null != AppDelegate.appDelegate.CustomerAppraisalLogs && AppDelegate.appDelegate.CustomerAppraisalLogs.Count > 0)
                {
                    CustomerAppLogsList = AppDelegate.appDelegate.CustomerAppraisalLogs;
                    var completedVehicle = CustomerAppLogsList.FindAll((CustomerAppraisalLogEntity obj) => obj.Status == "CA");
                    AppraisalTableView.Source = new CustomerApprasialLogTVS(completedVehicle);
                }
                else
                {
                    Utility.ShowLoadingIndicator(this.View, "", true);

                    CustomerAppLogsList = await CallGuestAppraisalLogService(AppDelegate.appDelegate.GuestLastName, AppDelegate.appDelegate.GuestEmail, AppDelegate.appDelegate.GuestPhone);

                    Utility.HideLoadingIndicator(this.View);

                    var completedVehicle = CustomerAppLogsList.FindAll((CustomerAppraisalLogEntity obj) => obj.Status == "CA");
                    AppraisalTableView.Source = new CustomerApprasialLogTVS(completedVehicle);
                }
            }
            else
            {
                if (null != AppDelegate.appDelegate.AppraisalsLogs && AppDelegate.appDelegate.AppraisalsLogs.Count > 0)
                {
                    apploglist = AppDelegate.appDelegate.AppraisalsLogs;
                    var completedVehicle = apploglist.FindAll((AppraisalLogEntity obj) => obj.Status == "CA");
                    AppraisalTableView.Source = new ApprasialLogTVS(completedVehicle);
                }
                else
                {
                    Utility.ShowLoadingIndicator(this.View, "", true);

                    apploglist = await CallDealerAppraisalLogService();

                    Utility.HideLoadingIndicator(this.View);

                    var completedVehicle = apploglist.FindAll((AppraisalLogEntity obj) => obj.Status == "CA");
                    AppraisalTableView.Source = new ApprasialLogTVS(completedVehicle);
                }
            }

            AppraisalTableView.ReloadData();
        }