Пример #1
0
        public FullLengthLiningTDS.WetOutCatalystsDetailsDataTable GetCatalystsNew()
        {
            wetOutCatalystsDetails = (FullLengthLiningTDS.WetOutCatalystsDetailsDataTable)Session["wetOutCatalystsDetailsDummy"];
            if (wetOutCatalystsDetails == null)
            {
                wetOutCatalystsDetails = ((FullLengthLiningTDS)Session["fullLengthLiningTDS"]).WetOutCatalystsDetails;
            }

            return wetOutCatalystsDetails;
        }
Пример #2
0
        protected void AddCatalystsNewEmptyFix(GridView grdCatalysts)
        {
            if (grdCatalysts.Rows.Count == 0)
            {
                int companyId = Int32.Parse(hdfCompanyId.Value);
                FullLengthLiningTDS.WetOutCatalystsDetailsDataTable dt = new FullLengthLiningTDS.WetOutCatalystsDetailsDataTable();
                dt.AddWetOutCatalystsDetailsRow(-1, -1, -1, "", -1, -1, "", false, companyId, false);
                Session["wetOutCatalystsDetailsDummy"] = dt;

                grdCatalysts.DataBind();
            }

            // Normally executes at all postbacks
            if (grdCatalysts.Rows.Count == 1)
            {
                FullLengthLiningTDS.WetOutCatalystsDetailsDataTable dt = (FullLengthLiningTDS.WetOutCatalystsDetailsDataTable)Session["wetOutCatalystsDetailsDummy"];
                if (dt != null)
                {
                    grdCatalysts.Rows[0].Visible = false;
                    grdCatalysts.Rows[0].Controls.Clear();
                }
            }
        }