Example #1
0
        /// <summary>
        /// 根据配置生成人员
        /// </summary>
        private void CreateUsr()
        {
            string SurveyId = RequestData.Get("SurveyId") + "";

            if (!string.IsNullOrEmpty(SurveyId))
            {
                //先清除
                string SQL = @" delete from  FL_Culture..SurveyFinallyUsr where SurveyId='{0}' and CreateWay='1' ;
                                delete from  FL_Culture..SurveyCanReaderUsr where SurveyId='{0}' and CreateWay='1' ";
                SQL = string.Format(SQL, SurveyId);
                DataHelper.ExecSql(SQL);

                StatisticsUser Usr = new StatisticsUser();   //人员统计
                Usr.CreateReadUser(SurveyId);
                Usr.CreateSurveyedUser(SurveyId);

                RemoveEnableUsr(SurveyId); //公司
                GetMiddleDBUser(SurveyId);

                SQL = @" select Id from  FL_Culture..SurveyFinallyUsr where SurveyId='{0}'";
                SQL = string.Format(SQL, SurveyId);
                DataTable obj = DataHelper.QueryDataTable(SQL);
                if (obj.Rows.Count > 0)
                {
                    this.PageState.Add("CreateState", "1");
                }
                else
                {
                    this.PageState.Add("CreateState", "0");
                }
            }
        }
Example #2
0
 /// <summary>
 /// 根据选项生成人员
 /// </summary>
 private void AnalyzingUser()
 {
     if (!string.IsNullOrEmpty(SurveyId))
     {
         StatisticsUser St = new StatisticsUser();
         bool           bl = St.CreateSurveyedUser(SurveyId);
     }
 }