코드 새 2차원 테이블

3796 단어
#region "  Judgement  "
                string[,] Colstr ={ {"JudgementID","System.String"},
                                                    {"JudgementName","System.String"}};
                DataTable dtl = Function.CreatDataTable(Colstr, "Judgement");
                #endregion

                #region "  Judgement  "
                string[,] strContent ={{"1","Acceptable"},
                                                            {"2","Conditional (     )"},
                                                            {"3","Waive (  )"},
                                                            {"4","Reject"}};
                for (int j = 0; j < strContent.Length / 2; j++)
                {
                    DataRow dr = dtl.NewRow();
                    for (int i = 0; i < 2; i++)
                    {
                        dr[i] = strContent[j, i];
                    }
                    dtl.Rows.Add(dr);
                    dr = null;
                }
                #endregion

                return dtl;

좋은 웹페이지 즐겨찾기