private void bindPromotion() { var result = PromotionController.GetPromotion(promotion_id); if (result.Count > 0) { var current = result[0]; if (current != null) { txtPromotionCode.Text = current.promotion_code; ddlPromotonType.SelectedValue = current.promotion_type.ToString(); txtDiscountPercent.Text = current.discount_percent.ToString(); txtDiscountValue.Text = current.discount_value.ToString(); txtFreeProductId.Text = current.free_product_id; txtFreeAmount.Text = current.free_amount.ToString(); txtTitle.Text = current.title; txtDesciption.Text = current.description; imgPromotion.ImageUrl = getImage(current.image); imgName.Value = current.image; txtCompletePrice.Text = current.complete_price.ToString(); } } }