Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.BLL.ERPUserDesk MyModel   = new ZWL.BLL.ERPUserDesk();
            DataSet             MyDataSet = MyModel.GetList("UserName='******' order by ID asc");
            //记录集行数>0
            if (MyDataSet.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < MyDataSet.Tables[0].Rows.Count; i++)
                {
                    //循环在已选中加入
                    ListBox2.Items.Add(MyDataSet.Tables[0].Rows[i]["ModelName"].ToString());
                }
            }

            //权限判定,删除待选列表中,没有权限的项目
            for (int i = 0; i < ListBox1.Items.Count; i++)
            {
                if (ZWL.Common.PublicMethod.StrIFIn("|" + ListBox1.Items[i].Value + "|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")) == false)
                {
                    this.ListBox1.Items.Remove(ListBox1.Items[i]);
                    //将删除掉的序号加上
                    i--;
                }
            }
        }
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            //读取个人设置
            ZWL.BLL.ERPUserDesk MyModel = new ZWL.BLL.ERPUserDesk();
            DataSet MyDataSet = MyModel.GetList("UserName='******' order by ID asc");

            //记录集行数>0
            if (MyDataSet != null)
            {
                if (MyDataSet.Tables[0].Rows.Count > 0)
                {
                    string StartStr = "<table width=\"100%\"><tr><td valign=\"top\" width=\"50%\">";
                    string EndStr = "</td></tr></table>";
                    string MidStr = "";
                    for (int i = 0; i < MyDataSet.Tables[0].Rows.Count; i++)
                    {
                        //对当前次数求余,为1时为一行结束,否则0代表还有一个td
                        int TdInt = i % 2;
                        //按照设置显示桌面
                        string TTStr = "<div class=\"bigtype\"><table  width=\"98%\"  cellpadding=\"0\" cellspacing=\"0\" ><tr ><td height=\"30px\" background=\"../images/list_hd_bg.png\"><img src=\"../images/collapse_arrow.png\" width=\"16\" height=\"16\" align=\"absmiddle\"><a class=\"heiBold\" href=\"javascript:void(0);\" onclick=\"SwitchMenu('Model" + i.ToString() + "')\">" + MyDataSet.Tables[0].Rows[i]["ModelName"].ToString() + "</a></td><td background=\"../images/list_hd_bg2.png\"><div align=\"right\"><a href=\"MyDeskModify.aspx?ModelName=" + MyDataSet.Tables[0].Rows[i]["ModelName"].ToString() + "\"><img src=\"../images/pencil.png\" width=\"10\" height=\"10\" border=\"0\" align=\"absmiddle\"></a>&nbsp; <img onclick=\"_delmodel('" + MyDataSet.Tables[0].Rows[i]["ModelName"].ToString() + "')\" class=\"HerCss\" src=\"../images/close_x.png\" width=\"10\" height=\"10\" border=\"0\" align=\"absmiddle\">&nbsp; </div></td></tr></table></div><div class=\"Model" + i.ToString() + "\">" + GetDeskLink(MyDataSet.Tables[0].Rows[i]["ModelName"].ToString(), int.Parse(MyDataSet.Tables[0].Rows[i]["LookNum"].ToString())) + "</div>";
                        if (i != 0)
                        {
                            if (TdInt != 0)
                            {
                                MidStr = MidStr + TTStr + "</td></tr><tr><td valign=\"top\" width=\"50%\">";
                            }
                            else
                            {
                                MidStr = MidStr + TTStr + "</td><td valign=\"top\" width=\"50%\">";
                            }
                        }
                        else
                        {
                            MidStr = MidStr + TTStr + "</td><td valign=\"top\" width=\"50%\">";
                        }

                    }
                    this.Label1.Text = StartStr + MidStr + EndStr;
                }
            }

            //绑定单位门户

            BindDW();

        }
    }
Example #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            //读取个人设置
            ZWL.BLL.ERPUserDesk MyModel   = new ZWL.BLL.ERPUserDesk();
            DataSet             MyDataSet = MyModel.GetList("UserName='******' order by ID asc");

            //记录集行数>0
            if (MyDataSet != null)
            {
                if (MyDataSet.Tables[0].Rows.Count > 0)
                {
                    string StartStr = "<table width=\"100%\"><tr><td valign=\"top\" width=\"50%\">";
                    string EndStr   = "</td></tr></table>";
                    string MidStr   = "";
                    for (int i = 0; i < MyDataSet.Tables[0].Rows.Count; i++)
                    {
                        //对当前次数求余,为1时为一行结束,否则0代表还有一个td
                        int TdInt = i % 2;
                        //按照设置显示桌面
                        string TTStr = "<div class=\"bigtype\"><table  width=\"98%\"  cellpadding=\"0\" cellspacing=\"0\" ><tr ><td height=\"30px\" background=\"../images/list_hd_bg.png\"><img src=\"../images/collapse_arrow.png\" width=\"16\" height=\"16\" align=\"absmiddle\"><a class=\"heiBold\" href=\"javascript:void(0);\" onclick=\"SwitchMenu('Model" + i.ToString() + "')\">" + MyDataSet.Tables[0].Rows[i]["ModelName"].ToString() + "</a></td><td background=\"../images/list_hd_bg2.png\"><div align=\"right\"><a href=\"MyDeskModify.aspx?ModelName=" + MyDataSet.Tables[0].Rows[i]["ModelName"].ToString() + "\"><img src=\"../images/pencil.png\" width=\"10\" height=\"10\" border=\"0\" align=\"absmiddle\"></a>&nbsp; <img onclick=\"_delmodel('" + MyDataSet.Tables[0].Rows[i]["ModelName"].ToString() + "')\" class=\"HerCss\" src=\"../images/close_x.png\" width=\"10\" height=\"10\" border=\"0\" align=\"absmiddle\">&nbsp; </div></td></tr></table></div><div class=\"Model" + i.ToString() + "\">" + GetDeskLink(MyDataSet.Tables[0].Rows[i]["ModelName"].ToString(), int.Parse(MyDataSet.Tables[0].Rows[i]["LookNum"].ToString())) + "</div>";
                        if (i != 0)
                        {
                            if (TdInt != 0)
                            {
                                MidStr = MidStr + TTStr + "</td></tr><tr><td valign=\"top\" width=\"50%\">";
                            }
                            else
                            {
                                MidStr = MidStr + TTStr + "</td><td valign=\"top\" width=\"50%\">";
                            }
                        }
                        else
                        {
                            MidStr = MidStr + TTStr + "</td><td valign=\"top\" width=\"50%\">";
                        }
                    }
                    this.Label1.Text = StartStr + MidStr + EndStr;
                }
            }

            //绑定单位门户

            BindDW();
        }
    }
Example #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.BLL.ERPUserDesk MyModel   = new ZWL.BLL.ERPUserDesk();
         DataSet             MyDataSet = MyModel.GetList("UserName='******' order by ID asc");
         //记录集行数>0
         if (MyDataSet.Tables[0].Rows.Count > 0)
         {
             for (int i = 0; i < MyDataSet.Tables[0].Rows.Count; i++)
             {
                 //循环在已选中加入
                 ListBox2.Items.Add(MyDataSet.Tables[0].Rows[i]["ModelName"].ToString());
             }
         }
     }
 }
Example #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.BLL.ERPUserDesk MyModel = new ZWL.BLL.ERPUserDesk();
            DataSet MyDataSet = MyModel.GetList("UserName='******' order by ID asc");
            //记录集行数>0
            if (MyDataSet.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < MyDataSet.Tables[0].Rows.Count; i++)
                {
                    //循环在已选中加入
                    ListBox2.Items.Add(MyDataSet.Tables[0].Rows[i]["ModelName"].ToString());
                }
            }

            //权限判定,删除待选列表中,没有权限的项目
            for (int i = 0; i < ListBox1.Items.Count; i++)
            {
                if (ZWL.Common.PublicMethod.StrIFIn("|" + ListBox1.Items[i].Value + "|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")) == false)
                {
                    this.ListBox1.Items.Remove(ListBox1.Items[i]);
                    //将删除掉的序号加上
                    i--;
                }
            }
        }
    }