Exemplo n.º 1
0
        public Dictionary <string, TempComment> FormCollectionToDictionary(FormCollection form)
        {
            Dictionary <string, TempComment> dict = new Dictionary <string, TempComment>();
            string temp = string.Empty;

            foreach (string key in form.AllKeys.Where(sec => sec.Contains("KPIID")))
            {
                temp = key.Replace("KPIID", "");
                TempComment tc = new TempComment();
                tc.StrCommentID   = form["CommentID" + temp];
                tc.CommentContent = form["CommentContent" + temp];
                dict.Add(temp, tc);
            }
            return(dict);
        }
 public Dictionary<string, TempComment> FormCollectionToDictionary(FormCollection form)
 {
     Dictionary<string, TempComment> dict = new Dictionary<string, TempComment>();
     string temp = string.Empty;
     foreach (string key in form.AllKeys.Where(sec => sec.Contains("KPIID")))
     {
         temp = key.Replace("KPIID", "");
         TempComment tc = new TempComment();
         tc.StrCommentID = form["CommentID" + temp];
         tc.CommentContent = form["CommentContent" + temp];
         dict.Add(temp, tc);
     }
     return dict;
 }