// //////////////////////////////////////////////////////////////////////// // METHODS // public ServiceInformationTDS.CostInformationDataTable GetCostsNew() { serviceInformationServiceCost = (ServiceInformationTDS.CostInformationDataTable)Session["serviceCostsDummy"]; if (serviceInformationServiceCost == null) { serviceInformationServiceCost = ((ServiceInformationTDS)Session["serviceInformationTDS"]).CostInformation; } return serviceInformationServiceCost; }
protected void AddCostsNewEmptyFix(GridView grdView) { if (grdCosts.Rows.Count == 0) { int companyId = Int32.Parse(hdfCompanyId.Value); ServiceInformationTDS.CostInformationDataTable dt = new ServiceInformationTDS.CostInformationDataTable(); dt.AddCostInformationRow(-1, -1, "", "", "", -1, false, companyId, false, 0, 0, "", ""); Session["serviceCostsDummy"] = dt; grdCosts.DataBind(); } // Normally executes at all postbacks if (grdCosts.Rows.Count == 1) { ServiceInformationTDS.CostInformationDataTable dt = (ServiceInformationTDS.CostInformationDataTable)Session["serviceCostsDummy"]; if (dt != null) { grdCosts.Rows[0].Visible = false; grdCosts.Rows[0].Controls.Clear(); } } }