Exemple #1
0
        private HPCInfo.T_Photo_Event GetObject()
        {
            HPCInfo.T_Photo_Event _objPoto = new HPCInfo.T_Photo_Event();
            T_Photo_EventDAL      _DAL     = new T_Photo_EventDAL();

            if (Page.Request.Params["id"] != null)
            {
                _objPoto.Photo_ID    = int.Parse(Page.Request["id"].ToString());
                _objPoto             = _DAL.GetOneFromT_Photo_EventsByID(double.Parse(Page.Request["id"].ToString()));
                _objPoto.Date_Update = DateTime.Now;
            }
            else
            {
                _objPoto.Photo_ID    = 0;
                _objPoto.Date_Update = DateTime.Now;
            }
            int       butdanhID = 0;
            T_Butdanh obj_BD    = new T_Butdanh();

            HPCBusinessLogic.DAL.T_ButdanhDAL obj = new HPCBusinessLogic.DAL.T_ButdanhDAL();
            if (!string.IsNullOrEmpty(txt_Authod_Name.Text))
            {
                obj_BD.BD_ID   = 0;
                obj_BD.UserID  = _user.UserID;
                obj_BD.BD_Name = txt_Authod_Name.Text.Trim();
                butdanhID      = obj.Insert_Butdang(obj_BD);
            }
            _objPoto.AuthorID     = butdanhID;
            _objPoto.Photo_Name   = txt_Abl_Photo_Name.Text;
            _objPoto.Photo_Medium = UrlPathImage_RemoveUpload(txtThumbnail.Text);
            //_objPoto.File_Size = this.txt_Dungluong.Text.Trim();
            //if (txt_Dungluong.Text.Length > 0)
            //    if (UltilFunc.IsNumeric(this.txt_Dungluong.Text.Trim()))
            //        _objPoto.FileSquare = this.txt_Dungluong.Text.Trim();
            //_objPoto.File_Type = txt_loaifile.Text;
            _objPoto.Author_Name = txt_Authod_Name.Text;
            _objPoto.Lang_ID     = Convert.ToInt32(cboNgonNgu.SelectedValue);
            _objPoto.Date_Create = DateTime.Now;
            _objPoto.Creator     = _user.UserID;
            _objPoto.Photo_Desc  = txtGhichu.Text;
            if (Page.Request["Tab"] != null)
            {
                tab = Convert.ToInt32(Page.Request["Tab"].ToString());
            }
            if (tab == 0)
            {
                _objPoto.Photo_Status = 5;
            }
            else if (tab == -1)
            {
                _objPoto.Photo_Status = 5;
            }
            else if (tab == 1)
            {
                _objPoto.Photo_Status = 7;
            }
            _objPoto.Copy_From = 0;
            return(_objPoto);
        }
Exemple #2
0
        protected void cmd_Chamnhanbut_Click(object sender, EventArgs e)
        {
            int type = 0; try { type = int.Parse(Request["TypeID"].ToString()); }

            catch {; }
            if (checkCham.Checked)
            {
                int tien = 0;
                if (!string.IsNullOrEmpty(txt_tienNB.Text.Trim()))
                {
                    try { tien = int.Parse(txt_tienNB.Text.Trim().Replace(",", "")); }
                    catch { System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "Message", "alrt('Tiền phải nhập kiểu số nguyên');", true); return; }
                    foreach (DataGridItem item in dgr_anh.Items)
                    {
                        int   newid        = int.Parse(lbl_News_ID.Text);
                        Label lbl_Image_ID = (Label)item.FindControl("lbl_Image_ID");
                        int   ImageID      = int.Parse(lbl_Image_ID.Text);

                        HPCBusinessLogic.DAL.T_NewsDAL _Obj = new HPCBusinessLogic.DAL.T_NewsDAL();
                        _Obj.Update_TiennhanbutAnh(type, int.Parse(lbl_News_ID.Text), int.Parse(lbl_Image_ID.Text), tien, _user.UserID);
                        WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, lbl_tieude.Text,
                                                                       Request["Menu_ID"].ToString(), "Chấm nhận bút ảnh ", int.Parse(lbl_Image_ID.Text), type);
                    }
                }
            }
            else
            {
                foreach (DataGridItem item in dgr_anh.Items)
                {
                    TextBox txt_tiennhanbut = (TextBox)item.FindControl("txt_tien");
                    if (!string.IsNullOrEmpty(txt_tiennhanbut.Text))
                    {
                        try { int.Parse(txt_tiennhanbut.Text.Replace(",", "")); }
                        catch { System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "Message", "alrt('Tiền phải nhập kiểu số nguyên');", true); return; }
                    }
                }
                foreach (DataGridItem item in dgr_anh.Items)
                {
                    T_Butdanh obj_BD          = new T_Butdanh();
                    TextBox   txt_tiennhanbut = (TextBox)item.FindControl("txt_tien");
                    int       newid           = int.Parse(lbl_News_ID.Text);
                    Label     lbl_Image_ID    = (Label)item.FindControl("lbl_Image_ID");
                    int       ImageID         = int.Parse(lbl_Image_ID.Text);
                    int       tien            = 0;
                    if (!string.IsNullOrEmpty(txt_tiennhanbut.Text))
                    {
                        tien = int.Parse(txt_tiennhanbut.Text.Replace(",", ""));
                    }
                    HPCBusinessLogic.DAL.T_NewsDAL _Obj = new HPCBusinessLogic.DAL.T_NewsDAL();
                    _Obj.Update_TiennhanbutAnh(type, int.Parse(lbl_News_ID.Text), int.Parse(lbl_Image_ID.Text), tien, _user.UserID);

                    WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, lbl_tieude.Text,
                                                                   Request["Menu_ID"].ToString(), "Chấm nhận bút ảnh ", int.Parse(lbl_Image_ID.Text), type);
                }
            }
            LoadImage();
        }
Exemple #3
0
        public int Insert_Butdang(T_Butdanh _obj)
        {
            int _inserted;

            try
            {
                _inserted = HPCDataProvider.Instance().InsertObjectReturn(_obj, "CMS_InsertT_Butdanh");
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(_inserted);
        }
        private T_Multimedia SetItem(int Status)
        {
            T_MultimediaDAL video = new T_MultimediaDAL();

            HPCInfo.T_Multimedia _obj = new HPCInfo.T_Multimedia();
            if (Page.Request.Params["id"] != null)
            {
                _obj.ID = int.Parse(Page.Request["ID"].ToString());
                _obj    = video.GetOneFromT_MultimediaByID(_obj.ID);
            }
            else
            {
                _obj.ID          = 0;
                _obj.DateCreated = DateTime.Now;
                _obj.UserCreated = _user.UserID;
            }
            _obj.Tittle = this.txtTitle.Text.Trim();
            if (ddlNgonNgu.SelectedIndex > 0)
            {
                _obj.Languages_ID = Convert.ToInt32(this.ddlNgonNgu.SelectedValue);
                _obj.Category     = Convert.ToInt32(this.ddlCategorys.SelectedValue.ToString());
            }
            int       butdanhID = 0;
            T_Butdanh obj_BD    = new T_Butdanh();

            HPCBusinessLogic.DAL.T_ButdanhDAL obj = new HPCBusinessLogic.DAL.T_ButdanhDAL();
            if (!string.IsNullOrEmpty(txt_tacgia.Text.Trim()))
            {
                obj_BD.BD_ID   = 0;
                obj_BD.UserID  = _user.UserID;
                obj_BD.BD_Name = txt_tacgia.Text.Trim();
                butdanhID      = obj.Insert_Butdang(obj_BD);
            }
            _obj.AuthorID   = butdanhID;
            _obj.URLPath    = UrlPathImage_RemoveUpload(this.txtVideoPath.Text);
            _obj.URL_Images = UrlPathImage_RemoveUpload(txtThumbnail.Text);
            _obj.DateModify = DateTime.Now;
            _obj.Contents   = this.Txt_Desc.Text.Trim();
            _obj.UserModify = _user.UserID;
            _obj.IsLog      = false;
            _obj.Status     = Status;
            _obj.Display    = true;
            _obj.Tacgia     = txt_tacgia.Text;
            _obj.Comment    = txtGhichu.Text;
            //_obj.Chatluong = ddl_chatluong.SelectedIndex;
            return(_obj);
        }
Exemple #5
0
        public string GetBD_Name(Double _ID)
        {
            T_Butdanh obj = new T_Butdanh();

            try
            {
                obj = (T_Butdanh)HPCDataProvider.Instance().GetObjectByID(_ID.ToString(), "T_Butdanh", "BD_ID");
            }
            catch (Exception ex)
            {
                throw ex;
            }
            if (obj != null)
            {
                return(obj.BD_Name);
            }
            else
            {
                return(" ");
            }
        }
Exemple #6
0
        private T_Photo_Event setItem(double PhotoID, string urlImage, string PhotoTitle, double LangId, string tacgia, string tienNB, string ghichu, double status)
        {
            T_Photo_Event    _objPoto = new T_Photo_Event();
            T_Photo_EventDAL _DAL     = new T_Photo_EventDAL();
            int       butdanhID       = 0;
            T_Butdanh obj_BD          = new T_Butdanh();

            HPCBusinessLogic.DAL.T_ButdanhDAL obj = new HPCBusinessLogic.DAL.T_ButdanhDAL();
            if (!string.IsNullOrEmpty(tacgia))
            {
                obj_BD.BD_ID   = 0;
                obj_BD.UserID  = _user.UserID;
                obj_BD.BD_Name = tacgia.Trim();
                butdanhID      = obj.Insert_Butdang(obj_BD);
            }
            _objPoto.AuthorID = butdanhID;
            int tien = 0;

            if (!string.IsNullOrEmpty(tienNB))
            {
                try { tien = int.Parse(tienNB.Replace(",", "")); }
                catch {; }
            }
            _objPoto.Photo_ID = PhotoID;
            //_objPoto = _DAL.GetOneFromT_Photo_EventsByID(PhotoID);
            _objPoto.Date_Update  = DateTime.Now;
            _objPoto.Photo_Name   = PhotoTitle;
            _objPoto.Photo_Medium = urlImage;
            _objPoto.Author_Name  = tacgia;
            _objPoto.TienNB       = tien;
            _objPoto.Lang_ID      = LangId;
            _objPoto.Creator      = _user.UserID;
            _objPoto.Photo_Status = status;
            _objPoto.Photo_Desc   = ghichu;
            return(_objPoto);
        }
        private T_News SetItem(int _status)
        {
            T_NewsDAL Dal  = new T_NewsDAL();
            T_News    _obj = new T_News();

            if (Page.Request.Params["id"] != null)
            {
                _obj.News_ID = int.Parse(Page.Request["id"].ToString());
            }
            else
            {
                _obj.News_ID = 0;
            }

            int       butdanhID = 0;
            T_Butdanh obj_BD    = new T_Butdanh();

            HPCBusinessLogic.DAL.T_ButdanhDAL obj = new HPCBusinessLogic.DAL.T_ButdanhDAL();
            if (!string.IsNullOrEmpty(txt_Author_name.Text.Trim()))
            {
                obj_BD.BD_ID   = 0;
                obj_BD.UserID  = _user.UserID;
                obj_BD.BD_Name = txt_Author_name.Text.Trim();
                butdanhID      = obj.Insert_Butdang(obj_BD);
            }
            _obj.News_TacgiaID  = butdanhID;
            _obj.Lang_ID        = Convert.ToInt32(this.cbo_lanquage.SelectedValue.ToString());
            _obj.CAT_ID         = Convert.ToInt32(this.cbo_chuyenmuc.SelectedValue.ToString());
            _obj.News_Tittle    = this.Txt_tieude.Text.Trim();
            _obj.Images_Summary = this.txtThumbnail.Text.Trim();
            _obj.News_Sub_Title = this.txt_TieuDePhu.Text.Trim();
            _obj.News_Summary   = this.txt_tomtat.Text;
            _obj.News_Body      = this.txt_noidung.Text.Trim();
            _obj.News_EditorID  = _user.UserID;
            _obj.News_DateEdit  = DateTime.Now;
            if (_status == 6)
            {
                _obj.News_PublishNumber = DateTime.Now.Month;
                _obj.News_PublishYear   = DateTime.Now.Year;
                _obj.News_PublishedID   = _user.UserID;

                _obj.News_DatePublished = DateTime.Now;
                _obj.News_DateApproved  = DateTime.Now;
                _obj.News_AprovedID     = _user.UserID;
            }
            _obj.News_Comment    = this.Txt_Comments.Text.Trim();
            _obj.News_AuthorName = this.txt_Author_name.Text.Trim();
            _obj.News_AuthorID   = _user.UserID;
            //if (ddlNews_Priority.Items.Count > 0)
            //    _obj.News_Priority = int.Parse(ddlNews_Priority.SelectedValue.ToString());
            _obj.News_IsCategorys       = this.chk_IsCategorys.Checked;
            _obj.News_IsHomePages       = this.chk_IsHomePages.Checked;
            _obj.News_IsCategoryParrent = this.chk_IsCategoryParrent.Checked;
            _obj.News_Status            = _status;
            _obj.Keywords       = this.txtTukhoa.Text;
            _obj.News_IsHot     = this.chkNewsIsHot.Checked;
            _obj.News_IsFocus   = this.chkNewsIsFocus.Checked;
            _obj.News_Realate   = "";
            _obj.News_IsImages  = this.chkImages.Checked;
            _obj.News_IsVideo   = this.chkVideo.Checked;
            _obj.News_IsHistory = this.chkHistorys.Checked;
            int tien = 0;

            if (this.txtTienNhuanBut.Text.Trim().Length > 0)
            {
                tien = int.Parse(txtTienNhuanBut.Text.Replace(",", ""));
                if (tien > 0)
                {
                    _obj.News_TienNB        = tien;
                    _obj.News_Ngaycham      = DateTime.Now;
                    _obj.News_NguoichamNBID = _user.UserID;
                }
                else
                {
                    _obj.News_TienNB        = 0;
                    _obj.News_NguoichamNBID = 0;
                }
            }
            //Add By nvthai
            _obj.News_CopyFrom      = 0;
            _obj.News_Realate       = ReturnFilterListRelation();
            _obj.News_PhotoAtt      = txtVideoPath.Text;
            _obj.News_DescImages    = txtChuthichanh.Text;
            _obj.Image_Hot          = cbHienthiAnh.Checked;
            _obj.News_Nguon         = txtNguon.Text;
            _obj.News_DisplayMobile = cbDisplayMobile.Checked;
            _obj.News_Delete        = cbMoreViews.Checked;
            return(_obj);
        }
Exemple #8
0
        protected void linkSave_Click(object sender, EventArgs e)
        {
            try
            {
                #region "Duyet danh sach cac doi tuong tren luoi"
                HPCBusinessLogic.DAL.T_Album_PhotoDAL _cateDAL = new HPCBusinessLogic.DAL.T_Album_PhotoDAL();
                HPCInfo.T_Album_Photo _catObj;
                bool checktien = true;
                foreach (DataGridItem m_Item in grdListCate.Items)
                {
                    TextBox txt_tienNB = (TextBox)m_Item.FindControl("txt_tienNB");
                    if (!string.IsNullOrEmpty(txt_tienNB.Text))
                    {
                        try { int.Parse(txt_tienNB.Text.Replace(",", "")); }
                        catch { checktien = false; }
                    }
                }
                if (checktien)
                {
                    HPCBusinessLogic.DAL.T_ButdanhDAL obj = new HPCBusinessLogic.DAL.T_ButdanhDAL();
                    foreach (DataGridItem m_Item in grdListCate.Items)
                    {
                        T_Butdanh obj_BD = new T_Butdanh();

                        TextBox txtTitle         = (TextBox)m_Item.FindControl("txtTitle");
                        TextBox txt_tienNB       = (TextBox)m_Item.FindControl("txt_tienNB");
                        TextBox txtDesc          = (TextBox)m_Item.FindControl("txtDesc");
                        TextBox txttacgia        = (TextBox)m_Item.FindControl("txt_tacgia");
                        TextBox txt_tacgiaID     = (TextBox)m_Item.FindControl("txt_tacgiaID");
                        TextBox txt_OrderByPhoto = (TextBox)m_Item.FindControl("txt_OrderByPhoto");
                        Label   lblUrlPath       = (Label)m_Item.FindControl("lblUrlPath");
                        //CheckBox _chkIsHomeAlbum = (CheckBox)m_Item.FindControl("chkIsHomeAlbum");
                        int tien = 0;
                        if (!string.IsNullOrEmpty(txt_tienNB.Text))
                        {
                            try { tien = int.Parse(txt_tienNB.Text.Replace(",", "")); }
                            catch {; }
                        }
                        int intPhotoID = Convert.ToInt32(grdListCate.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString());
                        int butdanhID  = 0;

                        if (!string.IsNullOrEmpty(txttacgia.Text.Trim()))
                        {
                            obj_BD.BD_ID   = 0;
                            obj_BD.BD_Name = txttacgia.Text.Trim();
                            obj_BD.UserID  = _user.UserID;
                            butdanhID      = obj.Insert_Butdang(obj_BD);
                        }
                        _catObj = setItem(intPhotoID, txtTitle.Text, txtDesc.Text, Convert.ToInt32(txt_OrderByPhoto.Text), tien, txttacgia.Text, butdanhID);
                        _cateDAL.InsertT_Album_Photo(_catObj);
                    }
                    LoadData(cat_id);
                }
                else
                {
                    System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "Message", "alert('" + CommonLib.ReadXML("lblXacnhanTien") + "');", true);
                }
                #region Sync
                // DONG BO ANH
                int pageback = 0;
                try { pageback = int.Parse(Session["PageFromID"].ToString()); }
                catch {; }
                if (pageback == 3)
                {
                    SynFiles         _syncfile = new SynFiles();
                    T_Album_PhotoDAL _DAL      = new T_Album_PhotoDAL();
                    DataSet          _ds       = _DAL.Bind_T_Album_Photo(cat_id);
                    foreach (DataRow theRow in _ds.Tables[0].Rows)
                    {
                        string _img = theRow["Abl_Photo_Origin"].ToString();
                        if (_img.Trim().Length > 0)
                        {
                            _syncfile.SynData_UploadImgOne(_img, Global.ImagesService);
                        }
                    }
                }
                //END
                #endregion
                this.litMessages.Text = "Lưu giữ thành công";
                #endregion
            }
            catch (Exception ex)
            {
                HPCServerDataAccess.Lib.ShowAlertMessage(ex.Message.ToString());
            }
        }
        private T_Photo_Event GetObject()
        {
            T_Photo_Event    _objPoto = new T_Photo_Event();
            T_Photo_EventDAL _DAL     = new T_Photo_EventDAL();

            if (Page.Request.Params["id"] != null)
            {
                _objPoto.Photo_ID    = int.Parse(Page.Request["id"].ToString());
                _objPoto             = _DAL.GetOneFromT_Photo_EventsByID(double.Parse(Page.Request["id"].ToString()));
                _objPoto.Date_Update = DateTime.Now;
            }
            else
            {
                _objPoto.Photo_ID    = 0;
                _objPoto.Date_Update = DateTime.Now;
            }
            int       butdanhID = 0;
            T_Butdanh obj_BD    = new T_Butdanh();

            HPCBusinessLogic.DAL.T_ButdanhDAL obj = new HPCBusinessLogic.DAL.T_ButdanhDAL();
            if (!string.IsNullOrEmpty(txt_Authod_Name.Text))
            {
                obj_BD.BD_ID   = 0;
                obj_BD.UserID  = _user.UserID;
                obj_BD.BD_Name = txt_Authod_Name.Text.Trim();
                butdanhID      = obj.Insert_Butdang(obj_BD);
            }
            _objPoto.AuthorID     = butdanhID;
            _objPoto.Photo_Name   = txt_Abl_Photo_Name.Text;
            _objPoto.Photo_Medium = UrlPathImage_RemoveUpload(txtThumbnail.Text);
            _objPoto.Author_Name  = txt_Authod_Name.Text;
            int tien = 0;

            if (this.txtTienNhuanBut.Text.Trim().Length > 0)
            {
                tien = int.Parse(txtTienNhuanBut.Text.Replace(",", ""));
                if (tien > 0)
                {
                    _objPoto.TienNB = tien;
                }
                else
                {
                    _objPoto.TienNB = 0;
                }
            }
            _objPoto.Lang_ID     = Convert.ToInt32(cboNgonNgu.SelectedValue);
            _objPoto.Date_Update = DateTime.Now;
            _objPoto.Photo_Desc  = txtGhichu.Text;
            //_objPoto.Photo_Name = txt_Abl_Photo_Name.Text;
            //_objPoto.Photo_Medium = UrlPathImage_RemoveUpload(txtThumbnail.Text);
            //_objPoto.Author_Name = txt_Authod_Name.Text;
            //_objPoto.Lang_ID = Convert.ToInt32(cboNgonNgu.SelectedValue);

            if (Page.Request["Tab"] != null)
            {
                tab = Convert.ToInt32(Page.Request["Tab"].ToString());
            }
            if (tab == 0)
            {
                _objPoto.Photo_Status = 8;
            }
            else if (tab == -1)
            {
                _objPoto.Photo_Status = 8;
            }
            _objPoto.Copy_From = 0;
            return(_objPoto);
        }
        private HPCInfo.T_Album_Categories GetObject()
        {
            HPCInfo.T_Album_Categories _objCate = new HPCInfo.T_Album_Categories();
            if (Page.Request.Params["id"] != null)
            {
                _objCate.Cat_Album_ID = int.Parse(Page.Request["id"].ToString());
            }
            else
            {
                _objCate.Cat_Album_ID = 0;
            }
            _objCate.Cat_Album_Name = Txt_tieudeAbum.Text;
            _objCate.Lang_ID        = Convert.ToInt32(cbo_lanquage.SelectedValue);
            _objCate.Status         = true;// this.chkDisplay.Checked;
            if (txtOrder.Text.Length > 0)
            {
                if (UltilFunc.IsNumeric(this.txtOrder.Text.Trim()))
                {
                    _objCate.Possition = Convert.ToInt32(this.txtOrder.Text.Trim());
                }
            }
            _objCate.Links                   = "";
            _objCate.Cat_AlbumDesc           = this.txt_noidungAlbum.Text.Trim();
            _objCate.Target                  = true;
            _objCate.Copy_From               = 0;
            _objCate.Cat_Album_DateCreate    = DateTime.Now;
            _objCate.DateModify              = DateTime.Now;
            _objCate.UserCreated             = _user.UserID;
            _objCate.UserModify              = _user.UserID;
            _objCate.Cat_Album_DateSend      = DateTime.Now;
            _objCate.Cat_Album_DateApprove   = DateTime.Now;
            _objCate.Cat_Album_UserIDApprove = _user.UserID;
            int statusid = 1;

            try { statusid = int.Parse(lbl_status.Text); }
            catch {; }
            _objCate.Cat_Album_Status_Approve = statusid;
            if (this.cbo_chuyenmuc.SelectedIndex > 0)
            {
                _objCate.Cat_Album_CATID = int.Parse(cbo_chuyenmuc.SelectedValue);
            }
            else
            {
                _objCate.Cat_Album_CATID = 0;
            }
            _objCate.Tacgia = txt_Author_name.Text;
            //_objCate.Chatluong = ddlnews_chatluong.SelectedIndex;

            HPCBusinessLogic.DAL.T_ButdanhDAL obj = new HPCBusinessLogic.DAL.T_ButdanhDAL();
            T_Butdanh obj_BD    = new T_Butdanh();
            int       butdanhID = 0;

            if (!string.IsNullOrEmpty(txt_Author_name.Text.Trim()))
            {
                obj_BD.BD_ID   = 0;
                obj_BD.BD_Name = txt_Author_name.Text.Trim();
                obj_BD.UserID  = _user.UserID;
                butdanhID      = obj.Insert_Butdang(obj_BD);
            }
            _objCate.AuthorID = butdanhID;
            if (!string.IsNullOrEmpty(txt_tiennhanbut.Text))
            {
                _objCate.TongtienTT = int.Parse(txt_tiennhanbut.Text.Replace(",", ""));
            }
            else
            {
                _objCate.TongtienTT = 0;
            }
            //_objCate.Theloai = int.Parse(ddlNews_IsType.SelectedValue);
            //if (ddlnews_chatluong.SelectedIndex > 0)
            //    _objCate.Loaihinh = int.Parse(Drop_loaihinh.SelectedValue);
            //else
            //    _objCate.Loaihinh = 0;

            //_objCate.NguoichamNBID = _user.UserID;
            //_objCate.NgaychamNB = DateTime.Now;
            //_objCate.HesoTT = 0.0;
            _objCate.Comment = txtGhichu.Text;
            return(_objCate);
        }
        protected T_News SetItem(int status)
        {
            T_NewsDAL Dal      = new T_NewsDAL();
            T_News    obj_news = new T_News();

            if (Page.Request.Params["id"] != null)
            {
                obj_news.News_ID = Convert.ToInt32(Page.Request["id"].ToString());
            }
            else
            {
                obj_news.News_ID = 0;
            }
            obj_news = Dal.load_T_news(int.Parse(Request["id"]));
            //if (obj_news.News_Status == 73)
            //    obj_news.News_DateEdit = obj_news.News_DateEdit;
            //else
            //    obj_news.News_DateEdit = DateTime.Now;
            if (Txt_tieude.Text != "")
            {
                obj_news.News_Tittle = UltilFunc.CleanFormatTags(Txt_tieude.Text);
            }
            if (txt_TieuDePhu.Text.Length > 0) //added by haolm
            {
                obj_news.News_Sub_Title = UltilFunc.CleanFormatTags(txt_TieuDePhu.Text);
            }
            if (txt_tomtat.Text.Length > 0)
            {
                obj_news.News_Summary = txt_tomtat.Text;
            }
            if (int.Parse(cbo_chuyenmuc.SelectedIndex.ToString()) > 0)
            {
                obj_news.CAT_ID = int.Parse(cbo_chuyenmuc.SelectedValue.ToString());
            }
            if (int.Parse(cbo_lanquage.SelectedIndex.ToString()) > 0)
            {
                obj_news.Lang_ID = int.Parse(cbo_lanquage.SelectedValue.ToString());
            }
            //obj_news.News_Priority = int.Parse(ddlNews_Priority.SelectedValue.ToString());
            obj_news.News_IsCategorys       = this.chk_IsCategorys.Checked;
            obj_news.News_IsHomePages       = this.chk_IsHomePages.Checked;
            obj_news.News_IsCategoryParrent = this.chk_IsCategoryParrent.Checked;

            obj_news.News_IsImages  = this.chkImages.Checked;
            obj_news.News_IsVideo   = this.chkVideo.Checked;
            obj_news.News_IsHistory = this.chkHistorys.Checked;
            //obj_news.News_TienNB = 0;
            //int tien = 0;
            //if (this.txtTienNhuanBut.Text.Trim().Length > 0)
            //{
            //    tien = int.Parse(txtTienNhuanBut.Text.Replace(",", ""));
            //    if (tien > 0)
            //    {
            //        obj_news.News_TienNB = tien;
            //        obj_news.News_Ngaycham = DateTime.Now;
            //        obj_news.News_NguoichamNBID = _user.UserID;
            //    }
            //    else
            //    {
            //        obj_news.News_TienNB = 0;
            //        obj_news.News_NguoichamNBID = 0;
            //    }
            //}
            if (txt_noidung.Text.Length > 0)
            {
                obj_news.News_Body = txt_noidung.Text.Trim();
            }
            obj_news.News_PublishNumber = DateTime.Now.Month;
            obj_news.News_PublishYear   = DateTime.Now.Year;
            if (txtThumbnail.Text.Length > 0)
            {
                obj_news.Images_Summary = this.txtThumbnail.Text.Trim();
            }
            obj_news.News_AuthorName = UltilFunc.CleanFormatTags(txt_Author_name.Text);
            //obj_news.News_DateCreated = DateTime.Now;
            if (obj_news.News_Status != 55)
            {
                obj_news.News_DateEdit = DateTime.Now;
            }
            else
            {
                obj_news.News_DateEdit = obj_news.News_DateEdit;
            }
            obj_news.News_EditorID = _user.UserID;
            //obj_news.News_DatePublished = DateTime.Now;
            //obj_news.News_AuthorID = _user.UserID;
            //obj_news.News_PublishedID = _user.UserID;
            //obj_news.News_Paper_ID = 0;
            int       butdanhID = 0;
            T_Butdanh obj_BD    = new T_Butdanh();

            HPCBusinessLogic.DAL.T_ButdanhDAL obj = new HPCBusinessLogic.DAL.T_ButdanhDAL();
            if (!string.IsNullOrEmpty(txt_Author_name.Text.Trim()))
            {
                obj_BD.BD_ID   = 0;
                obj_BD.BD_Name = txt_Author_name.Text.Trim();
                obj_BD.UserID  = _user.UserID;
                butdanhID      = obj.Insert_Butdang(obj_BD);
            }
            obj_news.News_TacgiaID = butdanhID;
            obj_news.News_Comment  = UltilFunc.CleanFormatTags(Txt_Comments.Text);
            obj_news.Keywords      = this.txtTukhoa.Text;
            obj_news.News_IsHot    = this.chkNewsIsHot.Checked;
            obj_news.News_IsFocus  = this.chkNewsIsFocus.Checked;
            int tab = 0;

            if (Page.Request["Tab"] != null)
            {
                tab = Convert.ToInt32(Page.Request["Tab"].ToString());
            }
            if (tab == 0)
            {
                obj_news.News_Status = ConstNews.NewsApproving_tk;
            }
            else if (tab == -1)
            {
                obj_news.News_Status = ConstNews.NewsApproving_tk;
            }
            else if (tab == 1)
            {
                obj_news.News_Status = ConstNews.NewsReturn_tk;
            }
            else if (tab == 3)
            {
                obj_news.News_Status = ConstNews.NewsDelete;
            }
            else if (tab == 10)
            {
                obj_news.News_Status = ConstNews.NewsPublishing;
            }
            //Add By nvthai
            obj_news.News_Realate       = ReturnFilterListRelation();
            obj_news.News_PhotoAtt      = txtVideoPath.Text;
            obj_news.News_DescImages    = txtChuthichanh.Text;
            obj_news.Image_Hot          = cbHienthiAnh.Checked;
            obj_news.News_Nguon         = txtNguon.Text;
            obj_news.News_DisplayMobile = cbDisplayMobile.Checked;
            obj_news.News_Delete        = cbMoreViews.Checked;
            return(obj_news);
        }