예제 #1
0
        protected void UpdateButton_Click(object sender, EventArgs e)
        {
            SurveysInfo survey;

            try
            {
                List <SurveysInfo> surveys;
                if (Request.Form["SurveyID"] == null)
                {
                    surveys = new List <SurveysInfo>();
                }
                else
                {
                    surveys = Surveys;
                    int[] surveyIDs = (from p in Request.Form["SurveyID"].Split(',')
                                       select int.Parse(p)).ToArray();
                    int viewOrder = 1;
                    foreach (int surveyID in surveyIDs)
                    {
                        survey                      = surveys.Find(x => x.SurveyID == surveyID);
                        survey.ViewOrder            = viewOrder;
                        survey.LastModifiedByUserID = UserId;
                        viewOrder++;
                    }
                }
                SurveysController.Sort(surveys);
                Response.Redirect(Globals.NavigateURL(), false);
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }