protected void btnSave_Click(object sender, EventArgs e) { List <ATTPropertyCategoryColumns> lstPCCols = new List <ATTPropertyCategoryColumns>(); if (Session["LstPropCatCols"] != null) { lstPCCols = (List <ATTPropertyCategoryColumns>)Session["LstPropCatCols"]; if (BLLPropertyCategoryColumns.SavePropertyCategoryCols(lstPCCols)) { this.lblStatus.Text = "Proporty Category Saved Successfully."; this.programmaticModalPopup.Show(); this.grdPropCatCols.DataSource = null; this.grdPropCatCols.DataBind(); dllPropCat.SelectedIndex = -1; dllColNo.SelectedIndex = -1; dllColDType.SelectedIndex = -1; txtColName.ReadOnly = true; dllColNo.Enabled = false; dllColDType.Enabled = false; chkActive.Enabled = false; chkActive.Checked = false; this.btnSave.Visible = false; Session["LstPropCatCols"] = null; } } }
public void LoadProperty() { try { Session["PropertyCategoryList"] = BLLPropertyCategory.GetPropertyCateogryList(null); List <ATTPropertyCategory> lst = new List <ATTPropertyCategory>(); List <ATTPropertyCategory> lstRqd = new List <ATTPropertyCategory>(); lst = (List <ATTPropertyCategory>)Session["PropertyCategoryList"]; lstRqd = lst.FindAll( delegate(ATTPropertyCategory objPCC) { return(objPCC.MasterType != "0"); } ); this.lstProperty.DataSource = lstRqd; this.lstProperty.DataTextField = "PCategoryName"; this.lstProperty.DataValueField = "PCategoryID"; this.lstProperty.DataBind(); Session["PropertyCatColList"] = BLLPropertyCategoryColumns.GetPropertyCateogryColList(null); } catch (Exception ex) { this.lblStatusMessageTitle.Text = "Error Status"; this.lblStatusMessage.Text = ex.Message; this.programmaticModalPopup.Show(); } }