Exemplo n.º 1
0
 public void MyBind()
 {
     B_Project bproject = new B_Project();
     DataView dv = bproject.GetProjectAll();
     this.Egv.DataSource = dv;
     this.Egv.DataKeyNames = new string[] { "ProjectID" };
     this.Egv.DataBind();
 }
Exemplo n.º 2
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();
    }
Exemplo n.º 3
0
    private int m_uid = 0; //测试用

    #endregion Fields

    #region Methods

    public void MyBind()
    {
        //if (this.m_uid > 0)
        //{
             B_Project bproject = new B_Project();
             DataView dv = bproject.GetProjectByUid(this.m_uid);
             this.Egv.DataSource = dv;
             this.Egv.DataKeyNames = new string[] { "ProjectID" };
             this.Egv.DataBind();
        //}
    }
Exemplo n.º 4
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>");
     }
 }
Exemplo n.º 5
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();
        }
    }
Exemplo n.º 6
0
 protected void EBtnSubmit_Click(object sender, EventArgs e)
 {
     M_Project mproject=new M_Project();
     mproject.ProjectName=TxtProjectName.Text.Trim();
     mproject.ProjectIntro=TxtProjectIntro.Text.Trim();
     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();
     mproject.Uid = this.m_uid;
     mproject.Status = 0;
     if (Request.QueryString["rid"] != null)
         mproject.RequireID = DataConverter.CLng(Request.QueryString["rid"].Trim());
     else
         mproject.RequireID = 0;//无需求ID也可以由管理员自己添加项目
     B_Project bproject=new B_Project();
     if (bproject.Add(mproject))
     {
         Response.Write("<script language=javascript> alert('项目添加成功!');window.document.location.href='ProjectManage.aspx';</script>");
     }
 }
Exemplo n.º 7
0
 public string GetProjectEndDate(int projectid)
 {
     B_Project bproject = new B_Project();
     return bproject.GetProjectEndDate(projectid);
 }
Exemplo n.º 8
0
 public int CountProjectNumByRid(int rid)
 {
     B_Project bproject = new B_Project();
     return bproject.CountProjectNumByRid(rid);
 }