public void BindGrid() { DataSet ds = RotbalClass.GetList(null, null, null, null); if (ds != null) { DataView dv = new DataView(ds.Tables[0]); //if (Securenamespace.SecureData.CheckSecurity(ViewState["Abbaha"].ToString()) == null) //{ // ViewState["Abbaha"] = "id Desc"; //} //dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["Abbaha"].ToString()).ToString(); GridView1.DataSource = dv; GridView1.DataBind(); } }
public void UpItem(object sender, EventArgs e) { String id = ((HtmlAnchor)sender).HRef.ToString(); DataSet ds = RotbalClass.GetList(id, null, null, null); DataRow dr = ds.Tables[0].Rows[0]; TXTRotbalId.Text = id; TXTMoney.Text = dr["Money"].ToString(); DDRotbalType.SelectedValue = dr["RotbalType"].ToString(); DDYear.SelectedValue = dr["Year"].ToString(); EmptyLight(); LightBox.Value = "1"; BtnInsert.Visible = false; BtnSerach.Visible = false; BtnUpdate.Visible = true; }