コード例 #1
0
 protected override void OnPreRender(EventArgs e)
 {
     if (Page.IsPostBack)
     {
         if (Tabber.Visible)
         {
             if (this.prjID.Text.Length > 0 && this.prjID.Text != "-1")
             {
                 TeamManager1.prjID   = long.Parse(prjID.Text);
                 ProjectEvents1.prjID = long.Parse(prjID.Text);
                 ProjectEvents1.FillSections();
                 ProjectEvents1.FillEvents();
                 ProjectSectionRelation1.prjID = long.Parse(prjID.Text);
                 ProjectSectionRelation1.FillSections();
                 ProjectSectionRelation1.FillRelations();
                 string adminaccount = DatabaseConnection.SqlScalar("SELECT ADMINACCOUNT FROM PROJECT WHERE ID=" + prjID.Text);
                 if (adminaccount.Length > 0)
                 {
                     FillAdminAccount(adminaccount);
                 }
             }
         }
     }
     base.OnPreRender(e);
 }
コード例 #2
0
 protected void switchControl_Click(object sender, EventArgs e)
 {
     if (!ProjectSectionRelation1.Visible)
     {
         ProjectSectionRelation1.Visible = true;
         ProjectSectionRelation1.prjID   = ProjectSessions1.prjID;
         ProjectSectionRelation1.FillSections();
         ProjectSectionRelation1.FillRelations();
         saveRelations.Visible    = true;
         ProjectSessions1.Visible = false;
         switchControl.Visible    = false;
     }
 }
コード例 #3
0
        void NewRepeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            switch (e.CommandName)
            {
            case "btnOpenProject":
                Session["currentproject"] = ((Label)e.Item.FindControl("prjID")).Text;
                Response.Redirect("/project/projectgantt.aspx?m=74&dgb=1&si=75");

                break;

            case "btnModify":
                tblEvents.Visible    = true;
                tblRelations.Visible = true;
                tblSendmail.Visible  = true;
                Label   prjID = (Label)e.Item.FindControl("prjID");
                DataRow dr    = DatabaseConnection.CreateDataset("SELECT * FROM PROJECT WHERE ID=" + prjID.Text).Tables[0].Rows[0];
                this.prjID.Text     = dr["ID"].ToString();
                prjTitle.Text       = dr["TITLE"].ToString();
                prjDescription.Text = dr["DESCRIPTION"].ToString();
                prjOwnerID.Text     = dr["OWNER"].ToString();
                prjOwner.Text       = DatabaseConnection.SqlScalar("SELECT NAME+' '+SURNAME AS OWNER FROM ACCOUNT WHERE UID=" + prjOwnerID.Text);
                prjOpen.Checked     = (bool)dr["PRJOPEN"];
                prjSuspend.Checked  = (bool)dr["PRJSUSPEND"];

                if (dr["ADMINACCOUNT"].ToString().Length > 0)
                {
                    FillAdminAccount(dr["ADMINACCOUNT"].ToString());
                }

                NewRepeater1.Visible   = false;
                Tabber.Visible         = true;
                ProjectSessions1.prjID = long.Parse(prjID.Text);
                ProjectSessions1.BindSections();
                TeamManager1.prjID = long.Parse(prjID.Text);
                TeamManager1.BindTeam();
                ProjectEvents1.prjID = long.Parse(prjID.Text);
                ProjectEvents1.FillSections();
                ProjectEvents1.FillEvents();
                ProjectSectionRelation1.prjID = long.Parse(prjID.Text);
                ProjectSectionRelation1.FillSections();
                ProjectSectionRelation1.FillRelations();
                break;

            case "MultiDeleteButton":
                DeleteChecked.MultiDelete(this.NewRepeater1.MultiDeleteListArray, "Project");
                this.NewRepeater1.DataBind();
                break;
            }
        }