Example #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int id = QS("ID", 0);

            if (id == 0)
            {
                ShowFailMessageToClient("unauthorized access.");
                return;
            }
            else
            {
                ProjectPrincipalEntity principalEntity = app.GetProjectPrincipalInfo(id);
                if (principalEntity == null)
                {
                    ShowFailMessageToClient("unauthorized access.");
                    return;
                }

                principalEntity.Module = this.txtModule.Value;
                principalEntity.PM     = this.txtPM.Value;
                principalEntity.DEV    = this.txtDEV.Value;
                principalEntity.QA     = this.txtQA.Value;
                if (app.UpdateProjectPrincipal(principalEntity))
                {
                    Redirect(EmptyPopPageUrl, false, true);
                }
                else
                {
                    ShowFailMessageToClient(app.BrokenRuleMessages);
                }
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            app = new ProjectApplication();
            ((Pop)this.Master).Width = 540;
            if (!IsPostBack)
            {
                int id = QS("ID", 0);

                if (id == 0)
                {
                    ShowFailMessageToClient("unauthorized access.");
                    return;
                }
                ProjectPrincipalEntity principalEntity = app.GetProjectPrincipalInfo(id);
                if (principalEntity == null)
                {
                    ShowFailMessageToClient("unauthorized access.");
                    return;
                }
                else
                {
                    this.txtModule.Value = principalEntity.Module;
                    this.txtPM.Value     = principalEntity.PM;
                    this.txtDEV.Value    = principalEntity.DEV;
                    this.txtQA.Value     = principalEntity.QA;
                }
            }
        }