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

            if (id == 0)
            {
                ShowFailMessageToClient("unauthorized access.");
                return;
            }
            else
            {
                ProjectsEntity projectEntity = new ProjectApplication().Get(id);
                if (projectEntity == null)
                {
                    ShowFailMessageToClient("unauthorized access.");
                    return;
                }

                ProjectPrincipalEntity entity = new ProjectPrincipalEntity();
                entity.Module = this.txtModule.Value;
                entity.PM = this.txtPM.Value;
                entity.DEV = this.txtDEV.Value;
                entity.QA = this.txtQA.Value;
                entity.ProjectID = projectEntity.ProjectID;
                if (app.AddPrincipal(entity) > 0)
                {
                    Redirect(EmptyPopPageUrl, false, true);
                }
                else
                {
                    ShowFailMessageToClient(app.BrokenRuleMessages);
                }
            }
        }
Ejemplo n.º 2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            ProjectPrincipalEntity entity = new ProjectPrincipalEntity();

            entity.Module    = this.txtModule.Value;
            entity.PM        = this.txtPM.Value;
            entity.DEV       = this.txtDEV.Value;
            entity.QA        = this.txtQA.Value;
            entity.ProjectID = (int)QS("id", 0);
            if (app.AddPrincipal(entity) > 0)
            {
                ShowSuccessMessageToClient();
            }
            else
            {
                ShowFailMessageToClient(app.BrokenRuleMessages);
            }
        }