예제 #1
0
    protected void Repeater_2_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item | e.Item.ItemType == ListItemType.AlternatingItem)
        {
            Repeater rp3     = (Repeater)e.Item.FindControl("Repeater_3");
            int      index   = int.Parse(DataBinder.Eval(e.Item.DataItem, "menu_index").ToString());
            int      index_1 = int.Parse(DataBinder.Eval(e.Item.DataItem, "menu_index_1").ToString());
            String   caret   = (String)(DataBinder.Eval(e.Item.DataItem, "glyph_icon_caret").ToString());

            if (caret == "none")
            {
                rp3.DataSource = null;
                rp3.DataBind();
            }
            else
            {
                Masterpage_Option oManager = new Masterpage_Option();
                oManager.Open();

                rp3.DataSource = oManager.UserProgramMenu_sub2(HttpContext.Current.Session["group_access"].ToString().Trim(), index, index_1);
                rp3.DataBind();

                oManager.Close();
            }
        }
    }
예제 #2
0
    protected void Repeater_1_Init(object sender, EventArgs e)
    {
        if (HttpContext.Current.Session["group_access"] != null)
        {
            if (HttpContext.Current.Session["password"] == "change")
            {
                return;
            }
            Repeater rp1 = sender as Repeater;

            Masterpage_Option oManager = new Masterpage_Option();
            oManager.Open();

            rp1.DataSource = oManager.UserProgramMenu(HttpContext.Current.Session["group_access"].ToString().Trim());
            rp1.DataBind();

            oManager.Close();
        }
    }
예제 #3
0
    //protected void Page_Load(object sender, EventArgs e)
    //{
    //    //lblVersion.Text = AppSettings("version").ToString.Trim
    //    lblUser.Text = HttpContext.Current.Session("username");
    //    if (HttpContext.Current.Session("password") != "change")
    //    {
    //        if (Session.IsNewSession | string.IsNullOrEmpty(Page.User.Identity.Name))
    //        {
    //            Response.Redirect("logout.aspx");
    //        }
    //    }
    //}



    protected void DD_UserCompany_Init(object sender, EventArgs e)
    {
        if (HttpContext.Current.Session["username"] != null)
        {
            if (HttpContext.Current.Session["password"] == "change")
            {
                return;
            }
            Masterpage_Option oManager = new Masterpage_Option();
            oManager.Open();

            try
            {
                DropDownList ddl = sender as DropDownList;

                ddl.DataSource     = oManager.UserAssignCompany(HttpContext.Current.Session["username"].ToString().Trim());
                ddl.DataTextField  = "descs";
                ddl.DataValueField = "code";

                ddl.DataBind();

                if (HttpContext.Current.Session["company_code"] != null)
                {
                    ddl.SelectedValue = HttpContext.Current.Session["company_code"].ToString().Trim();
                }
                else
                {
                    HttpContext.Current.Session["company_code"] = ddl.SelectedValue;
                }
            }
            catch (Exception ex)
            {
            }

            oManager.Close();
        }
    }
예제 #4
0
    //protected void Page_Load(object sender, EventArgs e)
    //{
    //    //lblVersion.Text = AppSettings("version").ToString.Trim
    //    lblUser.Text = HttpContext.Current.Session("username");
    //    if (HttpContext.Current.Session("password") != "change")
    //    {
    //        if (Session.IsNewSession | string.IsNullOrEmpty(Page.User.Identity.Name))
    //        {
    //            Response.Redirect("logout.aspx");
    //        }
    //    }
    //}
    protected void DD_UserCompany_Init(object sender, EventArgs e)
    {
        if (HttpContext.Current.Session["username"] != null)
        {
            if (HttpContext.Current.Session["password"] == "change")
                return;
            Masterpage_Option oManager = new Masterpage_Option();
            oManager.Open();

            try
            {
                DropDownList ddl =  sender as DropDownList;

                ddl.DataSource = oManager.UserAssignCompany(HttpContext.Current.Session["username"].ToString().Trim());
                ddl.DataTextField = "descs";
                ddl.DataValueField = "code";

                ddl.DataBind();

                if (HttpContext.Current.Session["company_code"] != null)
                {
                    ddl.SelectedValue = HttpContext.Current.Session["company_code"].ToString().Trim();
                }
                else
                {
                    HttpContext.Current.Session["company_code"] = ddl.SelectedValue;
                }

            }
            catch (Exception ex)
            {
            }

            oManager.Close();
        }
    }
예제 #5
0
    protected void Repeater_1_Init(object sender, EventArgs e)
    {
        if (HttpContext.Current.Session["group_access"] != null)
        {
            if (HttpContext.Current.Session["password"] == "change")
                return;
            Repeater rp1 =  sender as Repeater;

            Masterpage_Option oManager = new Masterpage_Option();
            oManager.Open();

            rp1.DataSource = oManager.UserProgramMenu(HttpContext.Current.Session["group_access"].ToString().Trim());
            rp1.DataBind();

            oManager.Close();
        }
    }
예제 #6
0
    protected void Repeater_2_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item | e.Item.ItemType == ListItemType.AlternatingItem)
        {

            Repeater rp3 = (Repeater)e.Item.FindControl("Repeater_3");
            int index = int.Parse(DataBinder.Eval(e.Item.DataItem, "menu_index").ToString());
            int index_1 = int.Parse(DataBinder.Eval(e.Item.DataItem, "menu_index_1").ToString());
            String caret = (String)(DataBinder.Eval(e.Item.DataItem, "glyph_icon_caret").ToString());

            if (caret == "none")
            {
                rp3.DataSource = null;
                rp3.DataBind();

            }
            else
            {
                Masterpage_Option oManager = new Masterpage_Option();
                oManager.Open();

                rp3.DataSource = oManager.UserProgramMenu_sub2(HttpContext.Current.Session["group_access"].ToString().Trim(), index, index_1);
                rp3.DataBind();

                oManager.Close();

            }
        }
    }