コード例 #1
0
        private void btnIntegratePoint_Click(object sender, EventArgs e)
        {
            int pointId = this.GetPointId();

            if (pointId > 0)
            {
                bool success = false;
                this.lblNewPointValidation.Visible      = false;
                this.lblNewPointValidation.Text         = String.Empty;
                this.lblExistingPointValidation.Visible = false;
                this.lblExistingPointValidation.Text    = String.Empty;

                string userId = ((Entities.CustomPrincipal)Page.User).UserName;

                Facade.IPoint facPoint = new Facade.Point();
                success = facPoint.IntegratePoint(integrationPointId, pointId, userId);

                if (success)
                {
                    pnlIntegratePoint.Visible       = false;
                    ViewState["IntegrationPointId"] = 0;

                    existingPoint.Reset();
                    newPoint.Reset();
                    //this.newPoint.EditMode = true;

                    this.pointsToIntegrateGrid.Rebind();
                    if (this.pointsToIntegrateGrid.Items.Count > 0)
                    {
                        pnlIntegratePoint.Visible = true;
                        this.pointsToIntegrateGrid.Items[0].Selected = true;
                        this.pointsToIntegrateGrid_SelectedIndexChanged(this.pointsToIntegrateGrid, null);
                        this.pointsToIntegrateGrid.Items[0].Selected = true;
                    }
                }
            }
        }