Example #1
0
        void lvDuplicateAddress_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            int pointId = Convert.ToInt32(e.CommandArgument);

            Facade.IPoint  facPoint = new Facade.Point();
            Entities.Point p        = facPoint.GetPointForPointId(pointId);
            if (p != null)
            {
                if (p.PointStateId == ePointState.Deleted)
                {
                    string userId = ((Orchestrator.Entities.CustomPrincipal)Page.User).UserName;
                    p.PointStateId = ePointState.Approved;
                    Entities.FacadeResult result = facPoint.Update(p, userId);
                }

                this.SelectedPoint     = p;
                cboPoint.Text          = p.Description;
                cboPoint.SelectedValue = p.IdentityId.ToString() + "," + p.PointId.ToString();

                pnlNewPoint.Visible = false;
                pnlPoint.Visible    = true;
                this.divDuplicateAddress.Visible = false;
                inpCreateNewPointSelected.Value  = string.Empty;
            }
        }
Example #2
0
        private bool UpdatePoint()
        {
            Facade.IPoint facPoint = new Facade.Point();
            string        userName = ((Entities.CustomPrincipal)Page.User).UserName;

            // Ensure the latest traffic area id is reflected in the update.
            point.Address.TrafficArea.TrafficAreaId = Convert.ToInt32(cboTrafficArea.SelectedValue);

            Entities.FacadeResult retVal = facPoint.Update(point, userName);
            if (retVal.Success)
            {
                lblConfirmation.Text    = "The point has been updated.";
                lblConfirmation.Visible = true;

                point = facPoint.GetPointForPointId(point.PointId);
                cboTrafficArea.SelectedValue = point.Address.TrafficArea.TrafficAreaId.ToString();
            }
            else
            {
                infringementDisplay.Infringements = retVal.Infringements;
                infringementDisplay.DisplayInfringments();
            }

            return(retVal.Success);
        }
Example #3
0
        private bool UpdatePoint()
        {
            Facade.IPoint facPoint = new Facade.Point();
            string        userName = ((Entities.CustomPrincipal)Page.User).UserName;

            Entities.FacadeResult retVal = facPoint.Update(_point, userName);

            return(retVal.Success);
        }