Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SessionUserLogin nUserLogin = (SessionUserLogin)Session["UserLogin"];

            if (nUserLogin != null)
            {
                //nUserLogin.CheckRole("CU0002");
                //if (!nUserLogin.Role.Read)
                //{
                //    //Response.Write("<script >alert('Bạn không có quyền xem danh mục này!')</script>");
                //    Response.Write("<script >window.location.href='Error.aspx';</script>");
                //}
                //else
                {
                    if (!IsPostBack)
                    {
                        int       nPageNumber = int.Parse(txtPageNumber.Text);
                        int       nPageSize   = int.Parse(txtPageSize.Text);
                        DataTable nTable      = History_Data.GetListofMember(nPageSize, nPageNumber, Session["EmployeeKey"].ToInt());
                        string    listseeds   = "";
                        for (int i = 0; i < nTable.Rows.Count; i++)
                        {
                            if (i < nTable.Rows.Count - 1)
                            {
                                listseeds += nTable.Rows[i]["Name"].ToString() + ",";
                            }
                            else
                            {
                                listseeds += nTable.Rows[i]["Name"].ToString();
                            }
                        }
                        //LoadDataToToolboxWeb.DropDown_DDL(DDLSeeds, "Select SeedsName,SeedsName from PUL_Seeds where SeedsKey IN (" + listseeds + ")", false);
                        LoadDataToToolboxWeb.DropDown_DDL(DDLSeeds, "Select SeedsName,SeedsName from PUL_Seeds where SeedsKey IN(Select SeedsKey from PUL_SeedProcess  where dbo.PUL_SeedProcess.MemberKey = " + Convert.ToInt16(Session["EmployeeKey"]).ToString() + ")", false);
                        LoadData();
                    }
                }
            }
        }