예제 #1
0
        public static DataTable fetchdates(int userid)
        {
            bus_eleave_ugc1 bus = new bus_eleave_ugc1();

            bus.userid = userid;
            DataTable dt  = bus.fetch_holidays1();
            DataTable dt1 = new DataTable();

            dt1.Columns.Add("dates1");
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                string[] split = dt.Rows[i]["dates"].ToString().Split(',');
                for (int j = 0; j < split.Length; j++)
                {
                    DataRow dr = dt1.NewRow();
                    dr["dates1"] = split[j];
                    dt1.Rows.Add(dr);
                }
            }
            return(dt1);
        }