コード例 #1
0
        protected void GrdBlogList_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int id = 0;

            if (e.CommandName == "Deleterec")
            {
                id = Convert.ToInt32(e.CommandArgument);
                int result = clsobj.DeleteExclusiveCommercial(id);
                FillGridData();
            }
            else if (e.CommandName == "Editrec")
            {
                id = Convert.ToInt32(e.CommandArgument);
                DataTable dt = new DataTable();
                dt                  = clsobj.GetExclusiveCommercialDetail(id);
                txtName.Text        = dt.Rows[0]["Title"].ToString();
                hdnImg.Value        = dt.Rows[0]["ImageUrl"].ToString();
                imgbanner.ImageUrl  = "/admin/uploadfiles/" + dt.Rows[0]["ImageUrl"].ToString();
                txtDescription.Text = dt.Rows[0]["Description"].ToString();
                statustxt.Text      = dt.Rows[0]["Status"].ToString();
                txtAddress.Text     = dt.Rows[0]["Address"].ToString();
                Areatxt.Text        = dt.Rows[0]["Area"].ToString();
                Bathtxt.Text        = dt.Rows[0]["Bath"].ToString();

                Bedstxt.Text = dt.Rows[0]["Bed"].ToString();
                Typetxt.Text = dt.Rows[0]["Type"].ToString();
                Mlstxt.Text  = dt.Rows[0]["MLS"].ToString();
                Taxtxt.Text  = dt.Rows[0]["Tax"].ToString();

                imgbanner.Visible = true;
                FillGridData();
            }
            else
            {
                FillGridData();
            }
        }