Example #1
0
        protected void BtnSerach_Click1(object sender, EventArgs e)
        {
            DataSet  ds = HaghighiClass.GetList(null, TXTHaghighiName.Text, TXTManageName.Text, TXTHaghighiTel.Text, TXTHaghighiAdress.Text, TXTRepresentativeMobile.Text, TXTHaghighiyEmail.Text, TXTHaghighiFamily.Text);//, null, null, null, null, null,null );
            DataView dv = new DataView(ds.Tables[0]);

            //String StrSort = Securenamespace.SecureData.CheckSecurity(ViewState["Haghighi"].ToString());
            //if (StrSort != null)
            //{
            //    dv.Sort = StrSort;
            //}
            GridView1.DataSource = dv;
            GridView1.DataBind();
        }
Example #2
0
        public void BindGrid()
        {
            DataSet ds = HaghighiClass.GetList(null, null, null, null, null, null, null, null);

            if (ds != null)
            {
                DataView dv = new DataView(ds.Tables[0]);
                //if (Securenamespace.SecureData.CheckSecurity(ViewState["Haghighi"].ToString()) == null)
                //{
                //    ViewState["Haghighi"] = "HaghighiID Desc";
                //}
                //dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["Haghighi"].ToString()).ToString();
                GridView1.DataSource = dv;
                GridView1.DataBind();
            }
        }
Example #3
0
        public void UpItem(object sender, EventArgs e)
        {
            String HaghighiID = ((HtmlAnchor)sender).HRef.ToString();

            DataSet ds = HaghighiClass.GetList(HaghighiID.ToString(), null, null, null, null, null, null, null);

            DataRow dr = ds.Tables[0].Rows[0];

            TXTHaghighiAdress.Text       = dr["HaghighiAdress"].ToString();;
            TXTHaghighiID.Text           = dr["HaghighiID"].ToString();;
            TXTHaghighiFamily.Text       = dr["HaghighiFamily"].ToString();;
            TXTHaghighiName.Text         = dr["HaghighiName"].ToString();
            TXTHaghighiTel.Text          = dr["HaghighiTel"].ToString();
            TXTHaghighiyEmail.Text       = dr["HaghighiyEmail"].ToString();
            TXTManageName.Text           = dr["ManageName"].ToString();
            TXTRepresentativeMobile.Text = dr["RepresentativeMobile"].ToString();
            BtnInsert.Visible            = false;
            BtnUpdate.Visible            = true;
        }