Ejemplo n.º 1
0
 private HPCInfo.T_WebLinks GetObject()
 {
     HPCInfo.T_WebLinks _objCate = new HPCInfo.T_WebLinks();
     if (Page.Request.Params["id"] != null)
     {
         _objCate.ID = int.Parse(Page.Request["id"].ToString());
     }
     else
     {
         _objCate.ID = 0;
     }
     _objCate.URL         = Txt_URL.Text;
     _objCate.Description = Txt_Address.Text;
     if (cbo_lanquage.SelectedIndex > 0)
     {
         _objCate.Lang_ID = int.Parse(cbo_lanquage.SelectedValue.ToString());
     }
     _objCate.Logo   = txtThumbnail.Text;
     _objCate.Tittle = txtTieude.Text;
     _objCate.IsType = int.Parse(ddlType.SelectedValue);
     if (txtOrder.Text.Length > 0)
     {
         if (UltilFunc.IsNumeric(this.txtOrder.Text.Trim()))
         {
             _objCate.OrderLinks = Convert.ToInt32(this.txtOrder.Text.Trim());
         }
     }
     return(_objCate);
 }
Ejemplo n.º 2
0
 private ServicesInfor.WebLinks SetItemSyn(double News_ID)
 {
     HPCBusinessLogic.DAL.T_WebLinksDAL _untilDAL = new HPCBusinessLogic.DAL.T_WebLinksDAL();
     ServicesInfor.WebLinks             obj       = new ServicesInfor.WebLinks();
     HPCInfo.T_WebLinks objGet = new HPCInfo.T_WebLinks();
     objGet          = _untilDAL.load_T_WebLinks(int.Parse(News_ID.ToString()));
     obj.ID          = objGet.ID;
     obj.Lang_ID     = objGet.Lang_ID;
     obj.URL         = objGet.URL;
     obj.Description = objGet.Description;
     obj.Logo        = objGet.Logo;
     obj.OrderLinks  = objGet.OrderLinks;
     return(obj);
 }
Ejemplo n.º 3
0
        public int InsertT_WebLinks(HPCInfo.T_WebLinks obj)
        {
            int _inserted;

            try
            {
                _inserted = HPCDataProvider.Instance().InsertObjectReturn(obj, "[CMS_InsertT_WebLinks]");
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(_inserted);
        }
Ejemplo n.º 4
0
 private void PopulateItem(int _id)
 {
     HPCInfo.T_WebLinks _cateObj = new HPCInfo.T_WebLinks();
     HPCBusinessLogic.DAL.T_WebLinksDAL _cateDAL = new HPCBusinessLogic.DAL.T_WebLinksDAL();
     _cateObj = _cateDAL.load_T_WebLinks(_id);
     if (_cateObj != null)
     {
         txtTieude.Text    = _cateObj.Tittle.ToString();
         Txt_URL.Text      = _cateObj.URL.ToString();
         Txt_Address.Text  = _cateObj.Description.ToString();
         txtOrder.Text     = _cateObj.OrderLinks.ToString();
         txtThumbnail.Text = _cateObj.Logo.ToString();
         if (_cateObj.Logo.Length > 0)
         {
             this.ImgTemp.Src = HPCComponents.Global.TinPathBDT + "/" + _cateObj.Logo;
         }
         else
         {
             this.ImgTemp.Attributes.CssStyle.Add("display", "none");
         }
         cbo_lanquage.SelectedValue = _cateObj.Lang_ID.ToString();
         ddlType.SelectedValue      = _cateObj.IsType.ToString();
     }
 }