protected void btnLinkTra_Click(object sender, EventArgs e) { T_Photo_EventDAL _cateDAL = new T_Photo_EventDAL(); T_Photo_Event _catObj = new T_Photo_Event(); foreach (DataGridItem m_Item in grdListCate.Items) { CheckBox chk_Select = (CheckBox)m_Item.FindControl("optSelect"); TextBox txtTitle = (TextBox)m_Item.FindControl("txtTitle"); TextBox txttacgia = (TextBox)m_Item.FindControl("txt_tacgia"); Label lblUrlPath = (Label)m_Item.FindControl("lblUrlPath"); DropDownList cboNgonNgu = (DropDownList)m_Item.FindControl("cboNgonNgu"); double PhotoID = double.Parse(grdListCate.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString()); _catObj = setItem(int.Parse(PhotoID.ToString()), lblUrlPath.Text, txtTitle.Text, Convert.ToInt32(cboNgonNgu.SelectedValue), txttacgia.Text); _cateDAL.InsertT_Photo_Events(_catObj); if (chk_Select != null && chk_Select.Checked) { T_Photo_EventDAL _untilDAL = new T_Photo_EventDAL(); T_Photo_Event _obj = new T_Photo_Event(); _obj = _untilDAL.GetOneFromT_Photo_EventsByID(PhotoID); _untilDAL.UpdateStatus_Photo_Events(PhotoID, 7, _user.UserID, DateTime.Now); string _ActionsCode = "[Thời sự qua ảnh] " + menuName + " [Trả Ảnh] [Ảnh: " + _obj.Photo_Name + "]"; WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "[Trả Ảnh]", Convert.ToInt32(Request["Menu_ID"]), _ActionsCode, PhotoID, ConstAction.TSAnh); } } LoadData(status); }
public void grdListCategory_EditCommand(object source, DataGridCommandEventArgs e) { T_Photo_EventDAL _DAL = new T_Photo_EventDAL(); T_Photo_Event _obj = new T_Photo_Event(); TextBox txt_tienNB = e.Item.FindControl("txt_tienNB") as TextBox; int _ID = Convert.ToInt32(grdListCate.DataKeys[e.Item.ItemIndex].ToString()); _obj = _DAL.GetOneFromT_Photo_EventsByID(_ID); if (e.CommandArgument.ToString().ToLower() == "savephoto") { int tien = 0; if (!string.IsNullOrEmpty(txt_tienNB.Text)) { try { tien = int.Parse(txt_tienNB.Text.Replace(",", "")); } catch {; } } if (txt_tienNB.Text.Trim().Length > 0) { string sql = "Update T_Photo_Event set TienNB = " + tien + " where Photo_ID = " + _ID; HPCDataProvider.Instance().ExecSql(sql); string _ActionsCode = "[Thời sự qua ảnh] [Xuất bản ảnh thời sự] [Chấm nhuận bút ảnh trong ngày] [Ảnh: " + _obj.Photo_Name + "]"; WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "[Cập nhật]", Convert.ToInt32(Request["Menu_ID"]), _ActionsCode, _ID, ConstAction.TSAnh); ScriptManager.RegisterStartupScript(this, GetType(), "myFunction", "alert('Bạn đã chấm nhuận bút thành công !');", true); } else { txt_tienNB.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "myFunction", "alert('Bạn chưa nhập tiêu đề ảnh !');", true); } } }
protected void LinkNgungDang_Click(object sender, EventArgs e) { HPCBusinessLogic.T_Photo_EventDAL _untilDAL = new HPCBusinessLogic.T_Photo_EventDAL(); T_Photo_Event _obj = new T_Photo_Event(); T_Photo_EventDAL DAL = new T_Photo_EventDAL(); foreach (DataGridItem m_Item in grdListCate.Items) { CheckBox chk_Select = (CheckBox)m_Item.FindControl("optSelect"); TextBox txtGhichu = (TextBox)m_Item.FindControl("txtGhichu"); TextBox txt_tienNB = m_Item.FindControl("txt_tienNB") as TextBox; if (chk_Select != null && chk_Select.Checked) { double id = double.Parse(grdListCate.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString()); _obj = DAL.GetOneFromT_Photo_EventsByID(id); //ghi chu T_Photo_Event _objNew = new T_Photo_Event(); _objNew = setItem(_obj.Photo_ID, _obj.Photo_Medium, _obj.Photo_Name, _obj.Lang_ID, _obj.Author_Name, txt_tienNB.Text, txtGhichu.Text, _obj.Photo_Status); int _return = _untilDAL.InsertT_Photo_Events(_objNew); //string _ActionsCode1 = "[Thời sự qua ảnh] [Duyệt ảnh thời sự] [Cập nhật ảnh] [Ảnh: " + _obj.Photo_Name + "]"; //WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "[Cập nhật]", Convert.ToInt32(Request["Menu_ID"]), _ActionsCode1, _return, ConstAction.TSAnh); // Update on Server Destinations _untilDAL.UpdateStatus_Photo_Events(id, 2, _user.UserID, DateTime.Now); string _ActionsCode = "[Thời sự qua ảnh] [Ngừng đăng ][Ảnh: " + _obj.Photo_Name + ""; WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "[Ngừng đăng]", Convert.ToInt32(Request["Menu_ID"]), _ActionsCode, id, ConstAction.TSAnh); } } LoadData(this.txtPageIndex.Text.Trim()); }
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); }
protected void btnLinkDuyetAnh_Click(object sender, EventArgs e) { T_Photo_EventDAL _cateDAL = new T_Photo_EventDAL(); T_Photo_Event _catObj = new T_Photo_Event(); foreach (DataGridItem m_Item in grdListCate.Items) { CheckBox chk_Select = (CheckBox)m_Item.FindControl("optSelect"); TextBox txtTitle = (TextBox)m_Item.FindControl("txtTitle"); TextBox txttacgia = (TextBox)m_Item.FindControl("txt_tacgia"); Label lblUrlPath = (Label)m_Item.FindControl("lblUrlPath"); DropDownList cboNgonNgu = (DropDownList)m_Item.FindControl("cboNgonNgu"); double PhotoID = double.Parse(grdListCate.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString()); _catObj = setItem(int.Parse(PhotoID.ToString()), lblUrlPath.Text, txtTitle.Text, Convert.ToInt32(cboNgonNgu.SelectedValue), txttacgia.Text); _cateDAL.InsertT_Photo_Events(_catObj); if (chk_Select != null && chk_Select.Checked) { T_Photo_EventDAL _untilDAL = new T_Photo_EventDAL(); T_Photo_Event _obj = new T_Photo_Event(); _obj = _untilDAL.GetOneFromT_Photo_EventsByID(PhotoID); if (pageback == 1) { if (_obj.Photo_Name.Trim().Length > 0) { _untilDAL.UpdateStatus_Photo_Events(PhotoID, 8, _user.UserID, DateTime.Now); } else { ScriptManager.RegisterStartupScript(this, GetType(), "myFunction", "alert('Bạn chưa nhập tiêu đề ảnh !');", true); } } else if (pageback == 2) { _untilDAL.UpdateStatus_Photo_Events(PhotoID, 3, _user.UserID, DateTime.Now); #region Sync // DONG BO ANH SynFiles _syncfile = new SynFiles(); if (_obj.Photo_Medium.Length > 0) { _syncfile.SynData_UploadImgOne(_obj.Photo_Medium, HPCComponents.Global.ImagesService); } //END #endregion } string _ActionsCode = "[Thời sự qua ảnh] " + menuName + " [Gửi duyệt Ảnh] [Ảnh: " + _untilDAL.GetOneFromT_Photo_EventsByID(PhotoID).Photo_Name + "]"; WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "[Gửi duyệt]", Convert.ToInt32(Request["Menu_ID"]), _ActionsCode, PhotoID, ConstAction.TSAnh); } } LoadData(status); }
protected void LinkCancel_Click(object sender, EventArgs e) { foreach (DataGridItem m_Item in grdListCate.Items) { CheckBox chk_Select = (CheckBox)m_Item.FindControl("optSelect"); if (chk_Select != null && chk_Select.Checked) { int ID = int.Parse(grdListCate.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString()); T_Photo_EventDAL _DAL = new T_Photo_EventDAL(); T_Photo_Event _obj = new T_Photo_Event(); _obj = _DAL.GetOneFromT_Photo_EventsByID(ID); _DAL.DeleteFromT_Photo_Event(ID); string _ActionsCode = "[Thời sự qua ảnh] " + menuName + " [Xóa Ảnh] [Ảnh: " + _obj.Photo_Name + "]"; WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "[Xóa ảnh]", Convert.ToInt32(Request["Menu_ID"]), _ActionsCode, ID, ConstAction.TSAnh); } } LoadData(status); }
protected void linkSave_Click(object sender, EventArgs e) { try { T_Photo_EventDAL _DAL = new T_Photo_EventDAL(); T_Photo_Event _obj = new T_Photo_Event(); #region "Duyet danh sach cac doi tuong tren luoi" foreach (DataGridItem m_Item in grdListCate.Items) { TextBox txt_tienNB = m_Item.FindControl("txt_tienNB") as TextBox; double _ID = Convert.ToDouble(grdListCate.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString()); _obj = _DAL.GetOneFromT_Photo_EventsByID(_ID); int tien = 0; if (!string.IsNullOrEmpty(txt_tienNB.Text)) { try { tien = int.Parse(txt_tienNB.Text.Replace(",", "")); } catch {; } } if (txt_tienNB.Text.Trim().Length > 0) { string sql = "Update T_Photo_Event set TienNB = " + tien + " where Photo_ID = " + _ID; HPCDataProvider.Instance().ExecSql(sql); string _ActionsCode = "[Thời sự qua ảnh] [Xuất bản ảnh thời sự] [Chấm nhuận bút ảnh trong ngày] [Ảnh: " + _obj.Photo_Name + "]"; WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "[Cập nhật]", Convert.ToInt32(Request["Menu_ID"]), _ActionsCode, _ID, ConstAction.TSAnh); } } LoadData(this.txtPageIndex.Text.Trim()); this.litMessages.Text = "Chấm nhuận bút thành công"; #endregion } catch (Exception ex) { HPCServerDataAccess.Lib.ShowAlertMessage(ex.Message.ToString()); } }
private T_Photo_Event setItem(int PhotoID, string urlImage, string PhotoTitle, int LangId, string tacgia) { T_Photo_Event _objPoto = new T_Photo_Event(); T_Photo_EventDAL _DAL = new T_Photo_EventDAL(); _objPoto.Photo_ID = PhotoID; _objPoto = _DAL.GetOneFromT_Photo_EventsByID(PhotoID); if (_objPoto.Photo_Status == 7) { _objPoto.Date_Update = _objPoto.Date_Update; } else { _objPoto.Date_Update = DateTime.Now; } _objPoto.Photo_Name = PhotoTitle; _objPoto.Photo_Medium = urlImage; _objPoto.Author_Name = tacgia; _objPoto.Lang_ID = LangId; _objPoto.Date_Create = DateTime.Now; _objPoto.Creator = _user.UserID; _objPoto.Photo_Status = status; return(_objPoto); }
protected void Page_Load(object sender, EventArgs e) { _user = _userDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name); if (_user != null) { if (!IsPostBack) { try { double _ID = 0; if (Request["id"] != null) { _ID = Convert.ToDouble(Request["id"]); } if (_ID > 0) { _obj = DAL.GetOneFromT_Photo_EventsByID(_ID); Image1.ImageUrl = ConfigurationManager.AppSettings["tinpathbdt"].ToString() + _obj.Photo_Medium; } } catch { } } } }
protected void but_Trans_Click(object sender, EventArgs e) { ArrayList arNgu = new ArrayList(); foreach (DataGridItem m_Item in this.dgCopyNgonNgu.Items) { CheckBox chk_Select = (CheckBox)m_Item.FindControl("optSelect"); if (chk_Select != null && chk_Select.Checked) { arNgu.Add(double.Parse(this.dgCopyNgonNgu.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString())); } } ArrayList arrTin = new ArrayList(); foreach (DataGridItem m_Item in grdListCate.Items) { CheckBox chk_Select = (CheckBox)m_Item.FindControl("optSelect"); if (chk_Select != null && chk_Select.Checked) { arrTin.Add(double.Parse(grdListCate.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString())); } } T_Photo_EventDAL tt = new T_Photo_EventDAL(); NgonNgu_DAL _LanguagesDAL = new NgonNgu_DAL(); T_NgonNgu _obj = new T_NgonNgu(); if (arrTin.Count > 0) { for (int j = 0; j < arrTin.Count; j++) { double News_ID = double.Parse(arrTin[j].ToString()); if (tt.GetOneFromT_Photo_EventsByID(int.Parse(News_ID.ToString())).Lang_ID == 1) { for (int i = 0; i < arNgu.Count; i++) { //Thực hiện dịch ngữ int Lang_ID = int.Parse(arNgu[i].ToString()); if (!HPCShareDLL.HPCDataProvider.Instance().ExitsTranlate_T_Photo_Even(int.Parse(News_ID.ToString()), Lang_ID)) { System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "Message", "alert('" + Global.RM.GetString("LANQUAGE_ALERT") + "');", true); //return; } else { tt.InsertT_Photo_Events_SendLanger(int.Parse(News_ID.ToString()), int.Parse(News_ID.ToString()), Lang_ID); _obj = _LanguagesDAL.GetOneFromT_NgonNguByID(Lang_ID); string _ActionsCode = "[Thời sự qua ảnh] [Duyệt ảnh thời sự] [Dịch ngữ] [Ngữ: " + _obj.TenNgonNgu + "] [Ảnh: " + tt.GetOneFromT_Photo_EventsByID(News_ID).Photo_Name + "]"; WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "[Dịch ngữ]", Convert.ToInt32(Request["Menu_ID"]), _ActionsCode, int.Parse(News_ID.ToString()), ConstAction.TSAnh); } } } else { System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "Message", "alert('" + Global.RM.GetString("LANQUAGE_ALERT_EXITS") + "');", true); return; } } } else { System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "Message", "alert('Bạn chưa chọn mục cần dịch ngữ!');", true); } LoadData(status); ModalPopupExtender1.Hide(); }
public void grdListCategory_EditCommand(object source, DataGridCommandEventArgs e) { T_Photo_EventDAL _DAL = new T_Photo_EventDAL(); T_Photo_Event _obj = new T_Photo_Event(); ImageButton btnModify = e.Item.FindControl("btnModify") as ImageButton; ImageButton btnSave = e.Item.FindControl("btnSave") as ImageButton; ImageButton btnBack = e.Item.FindControl("btnBack") as ImageButton; Label lblNgonNgu = e.Item.FindControl("lblNgonNgu") as Label; LinkButton btnEdit = e.Item.FindControl("btnEdit") as LinkButton; Label lblTacGia = e.Item.FindControl("lblTacGia") as Label; Label lblUrlPath = e.Item.FindControl("lblUrlPath") as Label; DropDownList cboNgonNgu = e.Item.FindControl("cboNgonNgu") as DropDownList; TextBox txtTitle = e.Item.FindControl("txtTitle") as TextBox; TextBox txtTacGia = e.Item.FindControl("txt_tacgia") as TextBox; //Image imgView = e.Item.FindControl("imgView") as Image; //Image imgBrowse = e.Item.FindControl("imgBrowse") as Image; int _ID = Convert.ToInt32(grdListCate.DataKeys[e.Item.ItemIndex].ToString()); _obj = _DAL.GetOneFromT_Photo_EventsByID(_ID); if (e.CommandArgument.ToString().ToLower() == "editphoto") { btnSave.Visible = true; btnBack.Visible = true; btnModify.Visible = false; lblNgonNgu.Visible = false; lblTacGia.Visible = false; btnEdit.Visible = false; cboNgonNgu.Visible = true; txtTitle.Visible = true; txtTacGia.Visible = true; //imgView.Visible = false; //imgBrowse.Visible = true; } if (e.CommandArgument.ToString().ToLower() == "savephoto") { if (txtTitle.Text.Trim().Length > 0) { btnSave.Visible = false; btnBack.Visible = false; btnModify.Visible = true; lblNgonNgu.Visible = true; lblTacGia.Visible = true; btnEdit.Visible = true; cboNgonNgu.Visible = false; txtTitle.Visible = false; txtTacGia.Visible = false; //imgView.Visible = true; //imgBrowse.Visible = false; _obj = setItem(_ID, lblUrlPath.Text, txtTitle.Text, Convert.ToInt32(cboNgonNgu.SelectedValue), txtTacGia.Text); _DAL.InsertT_Photo_Events(_obj); } else { txtTitle.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "myFunction", "alert('Bạn chưa nhập tiêu đề ảnh !');", true); } LoadData(status); } if (e.CommandArgument.ToString().ToLower() == "back") { if (txtTitle.Text.Trim().Length > 0) { btnSave.Visible = false; btnBack.Visible = false; btnModify.Visible = true; lblNgonNgu.Visible = true; lblTacGia.Visible = true; btnEdit.Visible = true; cboNgonNgu.Visible = false; txtTitle.Visible = false; txtTacGia.Visible = false; //imgView.Visible = true; //imgBrowse.Visible = false; } else { txtTitle.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "myFunction", "alert('Bạn chưa nhập tiêu đề ảnh !');", true); } } if (e.CommandArgument.ToString().ToLower() == "edit") { int tab = 0; //if (TabContainer1.ActiveTabIndex == 0) //tab = 0; int catID = Convert.ToInt32(this.grdListCate.DataKeys[e.Item.ItemIndex].ToString()); Response.Redirect("~/Anh24h/Edit_PhotoDexuat.aspx?Menu_ID=" + Page.Request["Menu_ID"].ToString() + "&ID=" + catID + "&Tab=" + tab); } }
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); }
protected void LinkDanganh_Click(object sender, EventArgs e) { //if (!Page.IsValid) return; #region SYNC T_Photo_EventDAL _untilDAL = new T_Photo_EventDAL(); if (!string.IsNullOrEmpty(txtTienNhuanBut.Text)) { try { int.Parse(txtTienNhuanBut.Text.Replace(",", "")); } catch { System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "Message", "alert('" + CommonLib.ReadXML("lblXacnhanTien") + "');", true); return; } } T_Photo_Event _Obj = GetObject(); int _return = 0; if (Request["id"] == null) { _return = _untilDAL.InsertT_Photo_Events(_Obj); _untilDAL.UpdateStatus_Photo_Events(Convert.ToDouble(_return.ToString()), 3, _user.UserID, DateTime.Now); } else { _return = _untilDAL.InsertT_Photo_Events(_Obj); _untilDAL.UpdateStatus_Photo_Events(_Obj.Photo_ID, 3, _user.UserID, DateTime.Now); } #endregion // DONG BO ANH try { SynFiles _syncfile = new SynFiles(); _Obj = _untilDAL.GetOneFromT_Photo_EventsByID(_return); if (_Obj.Photo_Medium.Length > 0) { _syncfile.SynData_UploadImgOne(_Obj.Photo_Medium, HPCComponents.Global.ImagesService); } } catch (Exception) { throw; } //END string _ActionsCode = "[Thời sự qua ảnh] [Duyệt ảnh] [Ảnh: " + _Obj.Photo_Name + "]"; WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "[Duyệt]", Convert.ToInt32(Request["Menu_ID"]), _ActionsCode, _return, ConstAction.TSAnh); if (Page.Request["Tab"].ToString() != "-1") { if (Page.Request["Menu_ID"] != null) { Page.Response.Redirect("~/Anh24h/List_PhotosChoDuyet.aspx?Menu_ID=" + this.Page.Request["Menu_ID"].ToString() + "&Tab=" + Page.Request["Tab"].ToString()); } else { return; } } else { if (Page.Request["Menu_ID"] != null) { Page.Response.Redirect("~/Anh24h/List_PhotosChoDuyet.aspx?Menu_ID=" + this.Page.Request["Menu_ID"].ToString()); } else { return; } } }