Example #1
0
        private void bindStatus()
        {
            List<Status> lst = new List<Status>();
            lst.Add(new Status{val =-1, text = "All"});
            lst.Add(new Status { val = 1, text = "Có" });
            lst.Add(new Status { val = 0, text = "Không" });

            ddlStatus.DataSource = lst;
            ddlStatus.DataValueField = "val";
            ddlStatus.DataTextField = "text";
            ddlStatus.DataBind();
        }
Example #2
0
 private void bindPromotionType()
 {
     List<Status> lst = new List<Status>();
     lst.Add(new Status { val = 1, text = "Phần trăm" });
     lst.Add(new Status { val = 0, text = "Giá trị" });
     ddPromotionType.DataSource = lst;
     ddPromotionType.DataTextField = "text";
     ddPromotionType.DataValueField = "val";
     ddPromotionType.DataBind();
 }