Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Session["dt"] = null;
        string uid = "";

        if (Session["UserLoginName"] == null)
        {
            Response.Redirect("~/Source1/Login.aspx");
            Response.End();


            return;
        }
        uid = Session["UserLoginName"].ToString();
        if (!IsPostBack)
        {
            DataTable dt1 = SQLHelper.reDs(strsql).Tables[0];
            this.DropDownList2.DataSource     = dt1;
            this.DropDownList2.DataValueField = "pl_prod_line";
            this.DropDownList2.DataTextField  = "pl_desc";
            this.DropDownList2.DataBind();

            DataTable dt = Function_Admin.User_Login(6, uid, "", "");
            Function_Admin.initDrop(DropDownList3, dt, "comp");
            Function_Admin.initDrop(DropDownList4, dt, "comp");
        }

        if (DropDownList2.SelectedItem.Text == "辅料-刀具类")
        {
            Panel2.Visible = true;
            Panel3.Visible = false;
        }
        else
        {
            Panel2.Visible = false;
            Panel3.Visible = true;
        }
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // if (Session["UserLoginName"].ToString() == null)
        if (Session["UserLoginName"] == null)
        {
            Response.Redirect("~/Source1/Login.aspx");
            Response.End();


            return;
        }
        if (!Page.IsPostBack)
        {
            string    uid    = Session["UserLoginName"].ToString();
            DataTable dtcomp = Function_Admin.User_Login(6, uid, "", "");
            Function_Admin.initDrop(DropDownList5, dtcomp, "comp");
            GetData();
        }
    }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // if (Session["UserLoginName"].ToString() == null)
        if (Session["UserLoginName"] == null)
        {
            Response.Redirect("~/Source1/Login.aspx");
            Response.End();


            return;
        }

        string    uid = Session["UserLoginName"].ToString();
        DataTable dt  = new DataTable();

        //dt = Function_Admin.User_Login(2, Session["UserLoginName"].ToString(), "", "仓库");
        //if (dt.Rows.Count<=0)
        //{
        //    Response.Write("<script>javascript:alert('您没仓库确认的权限')</script>");

        //    return;
        //}
        if (!Page.IsPostBack)
        {
            //txtly_date3.Text = DateTime.Now.ToString("MM/dd/yyyy");
            //txtly_date4.Text = DateTime.Now.AddDays(1).ToString("MM/dd/yyyy");
            DataTable dtcomp = Function_Admin.User_Login(6, uid, "", "");
            Function_Admin.initDrop(DropDownList5, dtcomp, "comp");

            DataTable dtcode = new DataTable();
            dtcode = Car.usp_llr_Confirm(9, "", "");
            ddl_code.DataSource     = dtcode;
            ddl_code.DataTextField  = "describ";
            ddl_code.DataValueField = "describ";
            ddl_code.DataBind();
            ddl_code.Items.Insert(0, new ListItem("", ""));
            GetData();
            DisplayGrid();
        }
    }