public async Task SaveDetail()
        {
            Building      build   = new Building();
            tblBuilding   dbbuild = new tblBuilding();
            tblCompliance com     = new tblCompliance();

            build.LocationID       = _locid;
            build.BuildingCode     = "";
            build.BuildingSystemID = BSSelectedValue;
            build.SystemElementID  = 0;
            build.SystemTypeID     = 0;
            build.Rating           = 0;
            build.Details          = _detail;
            //build.IsDeficiencyRepair = true;
            build.ProjectID          = PLSelectedValue;
            build.ServiceContractID  = SCSelectedValue;
            build.WorkOrder          = "";
            build.Compliance         = com.Get(CMSelectedValue);
            build.Height             = 0;
            build.Width              = 0;
            build.MaterialID         = 0;
            build.UserID             = Constant.UserID;
            build.createon           = DateTime.Now;
            build.AddressLine1       = "";
            build.AddressLine2       = "";
            build.LocationCity       = "";
            build.StateID            = 0;
            build.LocationZip        = "";
            build.createon           = DateTime.Now;
            build.isedit             = false;
            build.issupload          = false;
            build.IsDeficiencyRepair = false;
            bool ans = await App.Current.MainPage.DisplayAlert("Work Order", "Request for Work Order", "Yes", "No");

            if (ans == true)
            {
                build.WorkOrder = "1";
            }
            else
            {
                build.WorkOrder = "";
            }

            int bid = dbbuild.Add(build);

            App.Current.MainPage = new MainPageCS(new CameraPage(bid, "Facility"));
        }
        public async Task SaveDetail()
        {
            tblLocation dbloc = new tblLocation();
            Location    loc   = new Location();

            loc = dbloc.Get(_locid);
            Building    build   = new Building();
            tblBuilding dbbuild = new tblBuilding();

            build.LocationID       = _locid;
            build.BuildingCode     = "";
            build.BuildingSystemID = BSSelectedValue;
            build.SystemElementID  = SESelectedValue;
            build.SystemTypeID     = STSelectedValue;
            build.Rating           = RTSelectedValue;
            build.Details          = _detail;
            //build.IsDeficiencyRepair = true;
            build.ProjectID          = 0;
            build.ServiceContractID  = 0;
            build.WorkOrder          = "";
            build.Compliance         = "";
            build.Height             = 0;
            build.Width              = 0;
            build.MaterialID         = 0;
            build.UserID             = Constant.UserID;
            build.createon           = DateTime.Now;
            build.AddressLine1       = "";
            build.AddressLine2       = "";
            build.LocationCity       = "";
            build.StateID            = 0;
            build.LocationZip        = "";
            build.createon           = DateTime.Now;
            build.isedit             = false;
            build.issupload          = false;
            build.IsDeficiencyRepair = await App.Current.MainPage.DisplayAlert("FCA Deficiency Screen", "is this Deficiency/Repair ?", "Yes", "No");

            int bid = dbbuild.Add(build);

            App.Current.MainPage = new MainPageCS(new CameraPage(bid, "FCA"));
        }