protected void link_tralai_Click(object sender, EventArgs e) { HPCBusinessLogic.DAL.T_Album_CategoriesDAL T_Album = new HPCBusinessLogic.DAL.T_Album_CategoriesDAL(); if (TabContainer1.ActiveTabIndex == 0) { foreach (DataGridItem item in DataGrid_Choduyet.Items) { Label lblcatid = (Label)item.FindControl("lblcatid"); int _id = int.Parse(lblcatid.Text); CheckBox check = (CheckBox)item.FindControl("optSelect"); if (check.Checked) { T_Album.Update_Status(_id, 3, _user.UserID); } WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "Trả lại", Request["Menu_ID"].ToString(), "[Phóng sự ảnh chờ duyệt] [Trả lại Phóng sự ảnh: " + T_Album.load_T_Album_Categories(Convert.ToInt32(lblcatid.Text)).Cat_Album_Name + "]", _id, ConstAction.GocAnh); } LoadPSchoduyet(); } else if (TabContainer1.ActiveTabIndex == 1) { foreach (DataGridItem item in DataGrid_HuyXB.Items) { Label lblcatid = (Label)item.FindControl("lblcatid"); int _id = int.Parse(lblcatid.Text); CheckBox check = (CheckBox)item.FindControl("optSelect"); if (check.Checked) { T_Album.Update_Status(_id, 3, _user.UserID); } WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "Trả lại", Request["Menu_ID"].ToString(), "[Phóng sự ảnh hủy xuất bản] [Trả lại Phóng sự ảnh: " + T_Album.load_T_Album_Categories(Convert.ToInt32(lblcatid.Text)).Cat_Album_Name + "]", _id, ConstAction.GocAnh); } LoadPShuyXB(); } }
protected void link_duyet_Click(object sender, EventArgs e) { HPCBusinessLogic.DAL.T_Album_CategoriesDAL T_Album = new HPCBusinessLogic.DAL.T_Album_CategoriesDAL(); if (TabContainer1.ActiveTabIndex == 0) { foreach (DataGridItem item in DataGrid_Choduyet.Items) { Label lblcatid = (Label)item.FindControl("lblcatid"); CheckBox check = (CheckBox)item.FindControl("optSelect"); if (check.Checked) { int _id = Convert.ToInt32(lblcatid.Text); T_Album.Update_Status(_id, 4, _user.UserID); WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "Xuất bản", Request["Menu_ID"].ToString(), "[Phóng sự ảnh chờ duyệt] [Duyệt Phóng sự ảnh: " + T_Album.load_T_Album_Categories(Convert.ToInt32(lblcatid.Text)).Cat_Album_Name + "]", _id, ConstAction.GocAnh); #region Sync // DONG BO ANH try { SynFiles _syncfile = new SynFiles(); T_Album_PhotoDAL _cateDAL = new T_Album_PhotoDAL(); DataSet _ds = _cateDAL.Bind_T_Album_Photo(int.Parse(lblcatid.Text)); 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); } } } catch (Exception) { throw; } //END #endregion } } LoadPSchoduyet(); } else if (TabContainer1.ActiveTabIndex == 1) { foreach (DataGridItem item in DataGrid_HuyXB.Items) { Label lblcatid = (Label)item.FindControl("lblcatid"); CheckBox check = (CheckBox)item.FindControl("optSelect"); if (check.Checked) { int _id = int.Parse(lblcatid.Text); T_Album.Update_Status(_id, 4, _user.UserID); WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "Xuất bản", Request["Menu_ID"].ToString(), "[Phóng sự ảnh hủy xuất bản] [Duyệt Phóng sự ảnh: " + T_Album.load_T_Album_Categories(Convert.ToInt32(lblcatid.Text)).Cat_Album_Name + "]", _id, ConstAction.GocAnh); #region Sync // DONG BO ANH try { SynFiles _syncfile = new SynFiles(); T_Album_PhotoDAL _cateDAL = new T_Album_PhotoDAL(); DataSet _ds = _cateDAL.Bind_T_Album_Photo(int.Parse(lblcatid.Text)); 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); } } } catch (Exception) { throw; } //END #endregion } } LoadPShuyXB(); } }