예제 #1
0
        // ////////////////////////////////////////////////////////////////////////
        // PUBLIC METHODS
        //
        public RehabAssessmentTDS.LateralDetailsDataTable GetLateralDetails()
        {
            raAddLateralsNewDetails = (RehabAssessmentTDS.LateralDetailsDataTable)Session["raAddLateralsNewDummy"];
            if (raAddLateralsNewDetails == null)
            {
                raAddLateralsNewDetails = ((RehabAssessmentTDS)Session["rehabAssessmentTDS"]).LateralDetails;
            }

            return raAddLateralsNewDetails;
        }
예제 #2
0
        protected void RaAddLateralsNewEmptyFix(GridView grdView)
        {
            if (grdView.Rows.Count == 0)
            {
                RehabAssessmentTDS.LateralDetailsDataTable dt = new RehabAssessmentTDS.LateralDetailsDataTable();
                int companyId = Int32.Parse(hdfCompanyId.Value);
                dt.AddLateralDetailsRow(-1, "", "", "", "", "", DateTime.Now, "", "", "", "", "", "", false, companyId, false, false, false, "", false, "", true, false, true, false, "", "", "", DateTime.Now, false, DateTime.Now, false, false, false, "", false, DateTime.Now, "");
                Session["raAddLateralsNewDummy"] = dt;

                grdView.DataBind();
            }

            // Normally executes at all postbacks
            if (grdView.Rows.Count == 1)
            {
                RehabAssessmentTDS.LateralDetailsDataTable dt = (RehabAssessmentTDS.LateralDetailsDataTable)Session["raAddLateralsNewDummy"];
                if (dt != null)
                {
                    grdView.Rows[0].Visible = false;
                    grdView.Rows[0].Controls.Clear();
                }
            }
        }