Esempio n. 1
0
 private void PopulateItem(int _id)
 {
     HPCInfo.T_Customer_Ads _cateObj = new HPCInfo.T_Customer_Ads();
     HPCBusinessLogic.DAL.T_Customer_AdsDAL _cateDAL = new HPCBusinessLogic.DAL.T_Customer_AdsDAL();
     _cateObj = _cateDAL.load_T_Customer_Ads(_id);
     if (_cateObj != null)
     {
         Txt_DiachiQC.Text = _cateObj.URL.ToString();
         if (_cateObj.Start_Date.ToString().Length > 0)
         {
             txt_ngaybatdau.Text = _cateObj.Start_Date.ToString("dd/MM/yyyy");
         }
         else
         {
             txt_ngaybatdau.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");
         }
         if (_cateObj.End_Date.ToString().Length > 0)
         {
             txt_ngayketthuc.Text = _cateObj.End_Date.ToString("dd/MM/yyyy");
         }
         else
         {
             txt_ngayketthuc.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");
         }
         txtOrder.Text       = _cateObj.Order_Number.ToString();
         this.txtWidth.Text  = _cateObj.Width.ToString().Trim();
         this.txtHeight.Text = _cateObj.Height.ToString().Trim();
         txtImageVideo.Text  = _cateObj.Ads_ImgVideo.ToString();
         txtThumbnail.Text   = _cateObj.Ads_Images.ToString();
         //if (_cateObj.Ads_ImgVideo.Length > 0)
         //    this.ImagesVd.Src = _cateObj.Ads_ImgVideo;
         //if (_cateObj.Ads_Images.Length > 0)
         //    this.ImgTemp.Src =_cateObj.Ads_Images;
         cbo_Khachhang.SelectedValue     = _cateObj.Cust_ID.ToString();
         cbo_lanquage.SelectedValue      = _cateObj.Lang_ID.ToString();
         cbo_Vitri_hienthi.SelectedValue = _cateObj.Possittion.ToString();
         cbo_Display.SelectedValue       = _cateObj.Target.ToString();
         txtMota.Text = _cateObj.DisplayType.ToString();
         if (_cateObj.Status == 1)
         {
             chkDisplay.Checked = true;
         }
         else
         {
             chkDisplay.Checked = false;
         }
         if (_cateObj.Cat_ID.ToString().ToLower() == "all")
         {
             this.cbo_Category.SelectedValue = _cateObj.Cat_ID.ToString();
             //this.cbo_Category.UpdateAfterCallBack = true;
             System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "javascript", "javascript: SetDisplay('none');", true);
         }
         else
         {
             this.cbo_Category.SelectedValue = "CM";
             //this.cbo_Category.UpdateAfterCallBack = true;
             System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "javascript", "javascript: SetDisplay('block');", true);
         }
     }
 }
Esempio n. 2
0
 private void PopulateItem(int _id)
 {
     HPCInfo.T_Customer_Ads _cateObj = new HPCInfo.T_Customer_Ads();
     HPCBusinessLogic.DAL.T_Customer_AdsDAL _cateDAL = new HPCBusinessLogic.DAL.T_Customer_AdsDAL();
     _cateObj = _cateDAL.load_T_Customer_Ads(_id);
     if (_cateObj != null)
     {
         Txt_DiachiQC.Text  = _cateObj.URL.ToString();
         txtOrder.Text      = _cateObj.Order_Number.ToString();
         txtImageVideo.Text = _cateObj.Ads_ImgVideo.ToString();
         //txtThumbnail.Text = _cateObj.Ads_Images.ToString();
         txtMota.Text = _cateObj.DisplayType.ToString();
         if (_cateObj.Status == 1)
         {
             chkDisplay.Checked = true;
         }
         else
         {
             chkDisplay.Checked = false;
         }
     }
 }