Example #1
0
 /// <summary>
 /// Method to handle voter data once it has been stored in the database
 /// </summary>
 /// <param name="voter">Voter information as saved in the database and its answers</param>
 public void ProcessVoterData(VoterAnswersData voter)
 {
     voter.Voters[0].ContextUserName = HttpContext.Current.User.Identity.Name;
     new Voter().UpdateVoterADInfo(this.SurveyId, voter.Voters[0].VoterId,
                                   LDAPFactory.Create().GetVoterInfo(HttpContext.Current.User.Identity.Name)
                                   );
 }
Example #2
0
        protected void btnAddADGroup_Click(object sender, EventArgs e)
        {
            var ou         = txtAdGroupName.Text.Trim();
            var ldapHelper = LDAPFactory.Create();
            var results    = ldapHelper.SearchOU(ou);

            if (results != null && results.Count() > 0)
            {
                var list = results.Select(x => new SurveyADGroupDetail {
                });
                new Survey().AddADGroupMultiple(results.Select(x => new SurveyADGroupDetail
                {
                    AddInId     = this.SurveyId,
                    SurveyId    = this.SurveyId,
                    FilterPhase = x,
                    GroupName   = ldapHelper.GetFirstPath(x, false)
                }));
            }
            else
            {
                ShowErrorMessage(MessageLabel, "Không tìm thấy đơn vị trong LDAP");
            }
        }