티스토리 뷰

    protected void lv_ItemDataBound(object sender, ListViewItemEventArgs e)

    {

        Label eventPeriod = null;


        if (e.Item.ItemType == ListViewItemType.DataItem)

        {

            eventPeriod = (Label)e.Item.FindControl("EventPeriod");


            //System.Data.DataRowView rowView = ((ListViewDataItem)e.Item).DataItem as System.Data.DataRowView;

            //string temp = rowView["IsAlways"].ToString();

            

            //or


            GetListPropertyEventEntity getListPropertyEventEntity = (GetListPropertyEventEntity)(((ListViewDataItem)e.Item).DataItem);


            int isAlways = getListPropertyEventEntity.IsAlways;

            if (0.Equals(isAlways))

            {

                eventPeriod.Text = string.Format("{0}~{1}", getListPropertyEventEntity.StartDate.ToShortDateString(), getListPropertyEventEntity.EndDate.ToShortDateString());

            }            

        }

    }

반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함