예제 #1
0
    private int m_uid = 1; //测试用

    #endregion Fields

    #region Methods

    public void InItModify(int pid)
    {
        LblTitle.Text = "修改项目";
        B_Project bproject=new B_Project();
        M_Project mproject = bproject.GetProjectByid(pid);
        TxtProjectName.Text = mproject.ProjectName;
        TxtProjectIntro.Text = mproject.ProjectIntro;
        tbUBday.Value = mproject.StartDate.ToShortDateString();
        txtEndDay.Value = mproject.EndDate.ToShortDateString();
    }
예제 #2
0
 protected void EBtnModify_Click(object sender, EventArgs e)
 {
     B_Project bproject=new B_Project();
     M_Project mproject = bproject.GetProjectByid(Convert.ToInt32(Request.QueryString["Pid"].Trim()));
     mproject.ProjectName = TxtProjectName.Text;
     mproject.ProjectIntro = TxtProjectIntro.Text;
     mproject.StartDate = DataConverter.CDate(tbUBday.Value.Trim());
     if (!string.IsNullOrEmpty(txtEndDay.Value.Trim()))
         mproject.EndDate = DataConverter.CDate(txtEndDay.Value.Trim());
     else
         mproject.EndDate = DateTime.MaxValue;//new DateTime();
     if (bproject.Update(mproject))
     {
         Response.Write("<script language=javascript> alert('项目修改成功!');window.document.location.href='ProjectManage.aspx';</script>");
     }
 }
예제 #3
0
    public void InitPage()
    {
        B_Project bpro = new B_Project();
        B_ProjectWork bwork=new B_ProjectWork();
        M_Project mpro = new M_Project();
        StringBuilder strbul = new StringBuilder();
        int rid = 0;
        if (Request.QueryString["pid"] != null)
        {
            rid = DataConverter.CLng(Request.QueryString["pid"].Trim());
            mpro = bpro.GetProjectByid(rid);
            LblProName.Text = mpro.ProjectName;
            LblProIntro.Text = mpro.ProjectIntro;
            LblStartDate.Text = mpro.StartDate.ToShortDateString();
            if (mpro.EndDate.ToShortDateString() == DateTime.MaxValue.ToShortDateString())
            {
                LblEndDate.Text = "";
            }
            else
            {
                LblEndDate.Text = mpro.EndDate.ToShortDateString();
            }

            DataView dv=bwork.SelectWorkByPID(rid);
            if (dv.Table.Rows.Count > 0)
            {
                foreach (DataRow dr in dv.Table.Rows)
                {
                    strbul.Append("<a href='DiscussList.aspx?wid=" + dr["WorkID"] + "&pid=" + Request.QueryString["pid"] + "'>" + dr["WorkName"] + "</a>&nbsp;&nbsp;<a href='DiscussList.aspx?wid=" + dr["WorkID"] + "&pid=" + Request.QueryString["pid"] + "'>查看讨论</a><br/>");

                }
            }
            else
            {
                strbul.Append("暂无工作内容!");
            }

            LblContent.Text = strbul.ToString();
        }
    }