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()); }
protected void linkSave_Click(object sender, EventArgs e) { //if (!Page.IsValid) return; HPCBusinessLogic.T_Photo_EventDAL _untilDAL = new HPCBusinessLogic.T_Photo_EventDAL(); HPCInfo.T_Photo_Event _Obj = GetObject(); if (_Obj.Photo_ID == 0) { int _return = _untilDAL.InsertT_Photo_Events(_Obj); string _ActionsCode = "[Thời sự qua ảnh] [Thêm mới ảnh] [Ảnh: " + _untilDAL.GetOneFromT_Photo_EventsByID(Convert.ToDouble(_return.ToString())).Photo_Name + "]"; WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "[Thêm mới]", Convert.ToInt32(Request["Menu_ID"]), _ActionsCode, _return, ConstAction.TSAnh); System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "Message", "alert('" + Global.RM.GetString("VALIDATE_ADDNEWS") + "');", true); } else { int _return = _untilDAL.InsertT_Photo_Events(_Obj); string _ActionsCode = "[Thời sự qua ảnh] [Cập nhật ảnh] [Ảnh: " + _Obj.Photo_Name + "]"; WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "[Cập nhật]", Convert.ToInt32(Request["Menu_ID"]), _ActionsCode, _return, ConstAction.TSAnh); System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "Message", "alert('" + Global.RM.GetString("VALIDATE_ADDNEWS") + "');", true); } if (Page.Request["Tab"].ToString() != "-1") { if (Page.Request["Menu_ID"] != null) { Page.Response.Redirect("~/Anh24h/List_PhotosDexuat.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_PhotosDexuat.aspx?Menu_ID=" + this.Page.Request["Menu_ID"].ToString()); } else { return; } } }
protected void LinkDanganh_Click(object sender, EventArgs e) { //if (!Page.IsValid) return; #region SYNC HPCBusinessLogic.T_Photo_EventDAL _untilDAL = new HPCBusinessLogic.T_Photo_EventDAL(); T_Photo_Event _Obj = GetObject(); if (Request["id"] == null) { int _return = _untilDAL.InsertT_Photo_Events(_Obj); _untilDAL.UpdateStatus_Photo_Events(Convert.ToDouble(_return.ToString()), 8, _user.UserID, DateTime.Now); } else { _untilDAL.InsertT_Photo_Events(_Obj); _untilDAL.UpdateStatus_Photo_Events(_Obj.Photo_ID, 8, _user.UserID, DateTime.Now); } #endregion string _ActionsCode = "[Thời sự qua ảnh] [Gửi duyệt Ảnh] [Ảnh: " + _Obj.Photo_Name + "]"; //UltilFunc.WriteLogActionHistory(_user.UserID, _user.UserFullName, IpAddress(), _ActionsCode, 0, "[Gửi duyệt]", Convert.ToInt32(Request["Menu_ID"])); if (Page.Request["Tab"].ToString() != "-1") { if (Page.Request["Menu_ID"] != null) { Page.Response.Redirect("~/Anh24h/List_PhotosDexuat.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_PhotosDexuat.aspx?Menu_ID=" + this.Page.Request["Menu_ID"].ToString()); } else { return; } } }