コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     HyoaClass.Hyoa_mydesk Hyoa_mydesk = new HyoaClass.Hyoa_mydesk();
     Hyoa_mydesk.hy_userid = Session["hyuid"].ToString();
     Hyoa_mydesk.Delete();
     this.Response.Redirect("../index.aspx");
 }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //string ls_Action = "";
        string ls_MYTABLE = "";

        //if (this.Request.QueryString["Action"] != null)
        //{
        //    ls_Action = this.Request.QueryString["Action"].ToString();
        //}
        if (this.Request.QueryString["MYTABLE"] != null)
        {
            ls_MYTABLE = this.Request.QueryString["MYTABLE"].ToString();
            HyoaClass.Hyoa_mydesk Hyoa_mydesk = new HyoaClass.Hyoa_mydesk();
            Hyoa_mydesk.hy_userid = Session["hyuid"].ToString();
            Hyoa_mydesk.hy_mydesk = ls_MYTABLE;
            DataTable dt = Hyoa_mydesk.Getdocbyuserid(Session["hyuid"].ToString());
            if (dt.Rows.Count > 0)
            {
                Hyoa_mydesk.Update();
            }
            else
            {
                Hyoa_mydesk.Insert();
            }
        }
    }
コード例 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("login.aspx");

        DbsyMusic();

        HyoaClass.Hyoa_mydesk Hyoa_mydesk = new HyoaClass.Hyoa_mydesk();
        DataTable dt = Hyoa_mydesk.Getdocbyuserid(Session["hyuid"].ToString());
        string ls_left = "";
        string ls_right = "";
        if (dt.Rows.Count > 0)
        {
            if (dt.Rows[0]["hy_mydesk"].ToString() == "")
            {
                CommonShow();
            }
            else
            {
                if (dt.Rows[0]["hy_mydesk"].ToString().Contains("*"))
                {
                    string[] lv_mydesk = dt.Rows[0]["hy_mydesk"].ToString().Split('*');
                    if (lv_mydesk[0] != "")
                    {
                        ls_left = lv_mydesk[0].ToString().TrimEnd(',');
                    }
                    if (lv_mydesk[1] != "")
                    {
                        ls_right = lv_mydesk[1].ToString().TrimEnd(',');
                    }
                    //输出左侧
                    string[] lv_left = ls_left.Split(',');
                    for (int i = 0; i < lv_left.Length; i++)
                    {
                        hy_field_left += Gethy_field(lv_left[i].ToString());
                    }
                    //输出右侧
                    if (ls_right == "")
                    {
                        hy_field_right = "<div style=\"position: relative; padding-bottom: 0px\"></div>";   //右侧没有的时候放入一个空DIV
                    }
                    else
                    {
                        string[] lv_right = ls_right.Split(',');
                        if (lv_right.Length > 0)
                        {
                            for (int i = 0; i < lv_right.Length; i++)
                            {
                                hy_field_right += Gethy_field(lv_right[i].ToString());
                            }
                        }
                    }
                }
                else
                {
                    //左侧为空,全部到右边去了
                    //输出左侧
                    hy_field_left = "<div style=\"position: relative; padding-bottom: 0px\"></div>";    //左侧没有的时候放入一个空DIV

                    //输出右侧
                    ls_right = dt.Rows[0]["hy_mydesk"].ToString().TrimEnd(',');
                    string[] lv_right = ls_right.Split(',');
                    for (int i = 0; i < lv_right.Length; i++)
                    {
                        hy_field_right += Gethy_field(lv_right[i].ToString());
                    }
                }
            }
        }
        else
        {
            CommonShow();
        }
    }