Exemplo n.º 1
0
    public void DataBindToGridview()
    {
        string TableStr = "";

        ZWL.BLL.ERPTalkSetting MyModel = new ZWL.BLL.ERPTalkSetting();
        MyModel.GetModel();
        string[] TalkRoomList = MyModel.TalkName.Split('|');
        int      j            = 0;

        for (int i = 0; i < TalkRoomList.Length; i++)
        {
            if (TalkRoomList[i].Trim().Length > 0)
            {
                j = j + 1;
                if (j % 2 != 0)
                {
                    TableStr = TableStr + "<tr><td style=\"background-color: #ffffff;\" align=center width=100px height=70px><a class=\"heiBold\" href=\"TalkRoomIn.aspx?TalkRoomName=" + TalkRoomList[i].ToString() + "\"><img border=0 src=\"../images/TalkRoom.gif\" ></a></td><td style=\"background-color: #ffffff;\" ><img src=\"../images/JianTou.gif\" ><a class=\"heiBold\" href=\"TalkRoomIn.aspx?TalkRoomName=" + TalkRoomList[i].ToString() + "\">" + TalkRoomList[i].ToString() + "</a></td>";
                }
                else
                {
                    TableStr = TableStr + "<td style=\"background-color: #ffffff;\" align=center width=100px height=70px><a class=\"heiBold\" href=\"TalkRoomIn.aspx?TalkRoomName=" + TalkRoomList[i].ToString() + "\"><img border=0 src=\"../images/TalkRoom.gif\" ></a></td><td style=\"background-color: #ffffff;\" ><img src=\"../images/JianTou.gif\" ><a class=\"heiBold\" href=\"TalkRoomIn.aspx?TalkRoomName=" + TalkRoomList[i].ToString() + "\">" + TalkRoomList[i].ToString() + "</a></td></tr>";
                    //TableStr = TableStr + "<tr><td style=\"background-color: #ffffff;\" align=center width=100px height=70px><a class=\"heiBold\" href=\"TalkRoomIn.aspx?TalkRoomName=" + TalkRoomList[i].ToString() + "\"><img border=0 src=\"../images/TalkRoom.gif\" ></a></td><td style=\"background-color: #ffffff;\" ><img src=\"../images/JianTou.gif\" ><a class=\"heiBold\" href=\"TalkRoomIn.aspx?TalkRoomName=" + TalkRoomList[i].ToString() + "\">" + TalkRoomList[i].ToString() + "</a></td></tr>";
                }
            }
        }
        if (j % 2 != 0)
        {
            TableStr = TableStr + "<td style=\"background-color: #ffffff;\" align=center width=100px height=70px></td><td style=\"background-color: #ffffff;\" ></td></tr>";
        }
        this.Label1.Text = "<table width=100% bgcolor=\"#999999\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\">" + TableStr + "</table>";
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.BLL.ERPTalkSetting MyModel = new ZWL.BLL.ERPTalkSetting();
            MyModel.GetModel();
            TextBox1.Text = MyModel.TalkName;

            //设定按钮权限
            ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|119M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
        }
    }
Exemplo n.º 3
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPTalkSetting MyModel = new ZWL.BLL.ERPTalkSetting();
        MyModel.TalkName = TextBox1.Text.Trim();
        MyModel.Update();
        ZWL.Common.MessageBox.Show(this, "修改聊天室参数成功!");

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户设置聊天室参数";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();
    }