Exemple #1
0
        public void LoadData()
        {
            SessionUserLogin nUserLogin = (SessionUserLogin)Session["UserLogin"];
            DataTable        nTable     = new DataTable();

            nTable = Users_Roles_Data.GetList(nUserLogin.CooperativeKey, nUserLogin.GroupKey, txtSearch.Text, nUserLogin.CooperativeVenturesKey);
            //if (nUserLogin.GroupKey == 4)
            //{
            //    nTable = Users_Roles_Data.GetList(0, 0, txtSearch.Text);
            //}
            //if (nUserLogin.GroupKey == 3)
            //{
            //    nTable = Users_Roles_Data.GetList(nUserLogin.CooperativeVenturesKey, 3, txtSearch.Text);
            //}
            //else if (nUserLogin.GroupKey == 2)
            //{
            //    nTable = Users_Roles_Data.GetList(nUserLogin.CooperativeKey, 2, txtSearch.Text);
            //}
            GV_Users_Roles.DataSource = nTable;
            if (nTable.Rows.Count == 0)
            {
                nTable.Rows.Add(null, "");
            }
            GV_Users_Roles.DataBind();
            DateTime dt = DateTime.Now;

            LoadPages();
        }
Exemple #2
0
        protected void OnPaging(object sender, GridViewPageEventArgs e)
        {
            GV_Users_Roles.PageIndex = e.NewPageIndex;
            DataTable nTable = Users_Roles_Data.GetList(txtSearch.Text);

            GV_Users_Roles.DataSource = nTable;
            GV_Users_Roles.DataBind();
        }
Exemple #3
0
        protected void cmdView_Click1(object sender, ImageClickEventArgs e)
        {
            int       nPageNumber = int.Parse(txtPageNumber.Text);
            int       nPageSize   = int.Parse(txtPageSize.Text);
            DataTable nTable      = Users_Roles_Data.GetListByUserKey(Request["Key"], nPageSize, nPageNumber);

            if (nTable.Rows.Count == 0)
            {
                nTable.Rows.Add(null, null, 0, 0, 0, 0, "", "");
            }
            GV_Users_Roles.DataSource = nTable;
            GV_Users_Roles.DataBind();
            LoadPages();
        }
Exemple #4
0
 protected void GrDelete(object sender, CommandEventArgs e)
 {
     try
     {
         string[]       mKey = e.CommandArgument.ToString().Split('+');
         User_Role_Info info = new User_Role_Info(mKey[0], mKey[1]);
         info.Delete();
         DataTable nTable = Users_Roles_Data.GetList(txtSearch.Text);
         GV_Users_Roles.DataSource = nTable;
         GV_Users_Roles.DataBind();
         LoadPages();
     }
     catch
     {
         Response.Write("<script >alert('Có lỗi gì đó vui lòng thử lại!')</script>");
     }
 }
Exemple #5
0
        public void LoadData()
        {
            int nPageNumber             = int.Parse(txtPageNumber.Text);
            int nPageSize               = int.Parse(txtPageSize.Text);
            SessionUserLogin nUserLogin = (SessionUserLogin)Session["UserLogin"];
            DataTable        nTable     = Users_Roles_Data.GetListByUserKey(Request["Key"], nPageSize, nPageNumber);

            GV_Users_Roles.DataSource = nTable;
            if (nTable.Rows.Count == 0)
            {
                nTable.Rows.Add(null, null, 0, 0, 0, 0, "", "");
            }
            GV_Users_Roles.DataBind();
            DateTime dt = DateTime.Now;

            LoadPages();
        }
Exemple #6
0
        protected void cmdView_Click1(object sender, ImageClickEventArgs e)
        {
            SessionUserLogin nUserLogin = (SessionUserLogin)Session["UserLogin"];
            DataTable        nTable     = new DataTable();

            nTable = Users_Roles_Data.GetList(nUserLogin.CooperativeVenturesKey, nUserLogin.GroupKey, txtSearch.Text, nUserLogin.CooperativeVenturesKey);
            //if (nUserLogin.GroupKey == 4)
            //{
            //    nTable = Users_Roles_Data.GetList(txtSearch.Text);
            //}
            //if(nUserLogin.GroupKey==3)
            //{
            //    nTable = Users_Roles_Data.GetList(nUserLogin.CooperativeVenturesKey, 3, txtSearch.Text);
            //}
            //else  if(nUserLogin.GroupKey==2)
            //{
            //    nTable = Users_Roles_Data.GetList(nUserLogin.CooperativeKey, 2, txtSearch.Text);
            //}

            GV_Users_Roles.DataSource = nTable;
            GV_Users_Roles.DataBind();
            LoadPages();
        }