protected void BtnSerach_Click1(object sender, EventArgs e) { DataSet ds = AgeCalculationClass.GetList(null, TXTGroupAge.Text, TXTBonSize.Text, DDAgeTypeId.SelectedValue.ToString(), DDTreeType.SelectedValue.ToString(), DDyear.SelectedValue.ToString());// null, null, null,null ); DataView dv = new DataView(ds.Tables[0]); //String StrSort = Securenamespace.SecureData.CheckSecurity(ViewState["AgeCalculation"].ToString()); //if (StrSort != null) //{ // dv.Sort = StrSort; //} GridView1.DataSource = dv; GridView1.DataBind(); }
public void BindGrid() { DataSet ds = AgeCalculationClass.GetList(null, null, null, null, null, null); DataView dv = new DataView(ds.Tables[0]); //if (Securenamespace.SecureData.CheckSecurity(ViewState["AgeCalculation"].ToString()) == null) //{ // ViewState["AgeCalculation"] = "id Desc"; //} //dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["AgeCalculation"].ToString()).ToString(); GridView1.DataSource = dv; GridView1.DataBind(); }
public void UpItem(object sender, EventArgs e) { String id = ((HtmlAnchor)sender).HRef.ToString(); DataSet ds = AgeCalculationClass.GetList(null, null, null, null, null, null); DataRow dr = ds.Tables[0].Rows[0]; TXTid.Text = id; TXTBonSize.Text = dr["BonSize"].ToString(); TXTGroupAge.Text = dr["GroupAge"].ToString(); DDyear.SelectedValue = dr["year"].ToString(); DDTreeType.SelectedValue = dr["TreeType"].ToString(); DDAgeTypeId.SelectedValue = dr["AgeTypeId"].ToString(); EmptyLight(); LightBox.Value = "1"; BtnInsert.Visible = false; BtnSerach.Visible = false; BtnUpdate.Visible = true; }