void BindGrid() { if (Session["PersonalID"] != null) { string pid = Session["PersonalID"].ToString(); DataSet ds = CuttingTreeClass.GetList(null, null, null, null, null, null, null, null, null, pid, null, null, null, null, null, null, null, null, null, null); gvRequestList.DataSource = ds; gvRequestList.DataBind(); } }
protected void BtnSerach_Click1(object sender, EventArgs e) { DataSet ds = CuttingTreeClass.GetList(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); DataView dv = new DataView(ds.Tables[0]); String StrSort = Securenamespace.SecureData.CheckSecurity(ViewState["CuttingTree"].ToString()); if (StrSort != null) { dv.Sort = StrSort; } GridView1.DataSource = dv; GridView1.DataBind(); }
//public string Personelid //{ // get { } // set{} //} //public string Haghighiid //{ // get { } // set { } //} public void BindGrid() { DataSet ds = CuttingTreeClass.GetList(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); if (ds != null) { DataView dv = new DataView(ds.Tables[0]); //if (Securenamespace.SecureData.CheckSecurity(ViewState["CuttingTree"].ToString()) == null) //{ // ViewState["CuttingTree"] = "id Desc"; //} //dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["CuttingTree"].ToString()).ToString(); GridView1.DataSource = dv; GridView1.DataBind(); } }
public void UpItem(object sender, EventArgs e) { String id = ((HtmlAnchor)sender).HRef.ToString(); DataSet ds = CuttingTreeClass.GetList(id, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); DataRow dr = ds.Tables[0].Rows[0]; TXTid.Text = dr["id"].ToString(); TXTTitle.Text = dr["Title"].ToString(); TXTAddress.Text = dr["Address"].ToString(); TXTDesc.Text = dr["Desc"].ToString(); DDMantagheId.SelectedValue = dr["MantagheId"].ToString() == "" ? "0" :dr["MantagheId"].ToString(); string kk = dr["Peyman"].ToString(); if (dr["Peyman"].ToString() != null && dr["Peyman"].ToString() == "True") { chkPeyman.Checked = true; DDPeymanid.SelectedValue = dr["Peymanid"].ToString(); DDPeymanid.Visible = true; lblpeyman.Visible = true; } if (dr["Mojavez"].ToString() != null && dr["Mojavez"].ToString() == "True") { chkMojavez.Checked = true; DDLicesnceTypeid.SelectedValue = dr["LicesnceTypeid"].ToString(); DDLicesnceTypeid.Visible = true; lblMojavez.Visible = true; } TXTdate.Text = dr["date1"].ToString(); // EmptyLight(); LightBox.Value = "1"; BtnInsert.Visible = false; BtnUpdate.Visible = true; }