Beispiel #1
0
        protected void Btn_NewVersionAdd_Click(object sender, EventArgs e)
        {
            int ver = 1;

            if (!int.TryParse(DDL_Version.SelectedValue, out ver))
            {
                if (ver == 0)
                {
                    ver = 1;
                }
            }
            ver = ver + 1;
            bool result = DAL.ProgressMode.InsertNewActualProgress(Session["DatabaseName"].ToString(), int.Parse(Session["ProjectCode"].ToString()), ver, int.Parse(DDL_Activities.SelectedValue), TB_Date.Text, int.Parse(TB_Prog.Text));

            if (result)
            {
                Response.Write("<script>alert('儲存成功');</script>");
            }
            else
            {
                Response.Write("<script>alert('儲存失敗');</script>");
            }
            Gv_Prog.DataBind();
            make_header_row();
            make_date_row();
            make_compare_header_row();
            decimal[] PlanC;
            decimal[] RealC;
            make_compare_row(out PlanC, out RealC);
        }
Beispiel #2
0
 protected void DDL_Version_SelectedIndexChanged(object sender, EventArgs e)
 {
     Sql_Gv_Prog.SelectCommand = "select * from Progress_Real where Version='" + DDL_Version.SelectedValue + "' and ProjectID='" + Session["ProjectCode"].ToString() + "'";
     Gv_Prog.DataBind();
 }