예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.PageHeader = "Assessment Group";
        if (Request.QueryString["AGroupid"] != null)
        {
            GroupID = Convert.ToInt32(Request.QueryString["AGroupid"]);
        }
        if (!Page.IsPostBack)
        {

            if (GroupID > 0)
            {
                AssessmentGroup obj = new AssessmentGroup(GroupID, mCurrentUserID);
                LoadAssessmentGroup(obj);
            }
        }
    }
예제 #2
0
 protected void lbSave_Click(object sender, EventArgs e)
 {
     AssessmentGroup obj = new AssessmentGroup(mCurrentUserID);
     if (ViewState["GroupId"] != null)
     {
         obj.ID = (int)ViewState["GroupId"];
     }
     else
     {
         obj.ID = (GroupID > 0) ? GroupID : -1;
     }
     obj.Name = txtName.Text;
     obj.Description = txtDescription.Text;
     obj.Status = rblAGroupStatus.SelectedValue;
     obj.Save();
     LoadAssessmentGroup(obj);
     ViewState["GroupId"] = obj.ID;
 }
예제 #3
0
 private void LoadAssessmentGroup(AssessmentGroup obj)
 {
     txtName.Text = obj.Name;
     txtDescription.Text = obj.Description;
     rblAGroupStatus.SelectedValue = obj.Status;
 }