示例#1
0
        protected void lbtnLMarkAsActive_Click(object sender, EventArgs e)
        {
            LinkButton  lbtn = (LinkButton)sender;
            GridViewRow gvr  = (GridViewRow)lbtn.NamingContainer;
            var         val  = gvr.DataItemIndex;
            var         id   = gvr.Cells[3].Text;
            Citytbl     ct   = new Citytbl();

            ct.CityID = Convert.ToInt32(gvr.Cells[0].Text);
            if (id == "Active")
            {
                ct.IsActive = 0;
            }
            else if (id == "InActive")
            {
                ct.IsActive = 1;
            }
            objCityBl.UpdateCityIsActive(ct);
            GetCity();
        }