private void LoadData_CongViec() { string sOrder = GetOrderString() == "" ? "" : " ORDER BY " + GetOrderString(); Pager4.PageSize = Global.MembersPerPage; HPCBusinessLogic.DAL.T_IdieaDAL _T_newsDAL = new HPCBusinessLogic.DAL.T_IdieaDAL(); DataSet _ds; _ds = _T_newsDAL.Bin_T_IdieaVersionDynamic(Pager4.PageIndex, Pager4.PageSize, BuildSQL(1, sOrder)); int TotalRecords = Convert.ToInt32(_ds.Tables[1].Rows[0].ItemArray[0].ToString()); int TotalRecord = Convert.ToInt32(_ds.Tables[0].Rows.Count); if (TotalRecord == 0) { _ds = _T_newsDAL.Bin_T_IdieaVersionDynamic(Pager4.PageIndex - 1, Pager4.PageSize, BuildSQL(1, sOrder)); } dgr_ListCongViec.DataSource = _ds; dgr_ListCongViec.DataBind(); Pager4.TotalRecords = CurrentPage4.TotalRecords = TotalRecords; #region DETAI DA XU LY this.TabPanel2.HeaderText = "Đề tài đã xử lý (" + TotalRecords + ")"; DataSet _dsReturn; _dsReturn = _T_newsDAL.BindGridT_IdieaEditor(pages.PageIndex, pages.PageSize, BuildSQL(12, sOrder)); this.tabpnltinXuly.HeaderText = "Đề tài đang xử lý (" + _dsReturn.Tables[1].Rows[0].ItemArray[0].ToString() + ")"; DataSet _dsDaxuly; _dsDaxuly = _T_newsDAL.BindGridT_IdieaEditor(pages2.PageIndex, pages2.PageSize, BuildSQL(13, sOrder)); this.TabPanel1.HeaderText = "Đề tài trả lại (" + _dsDaxuly.Tables[1].Rows[0].ItemArray[0].ToString() + ")"; System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "javascript", "javascript: SetInnerBaiDangxyLy(" + _dsReturn.Tables[1].Rows[0].ItemArray[0].ToString() + "," + _dsReturn.Tables[1].Rows[0].ItemArray[0].ToString() + "," + TotalRecords + ");", true); _dsReturn.Clear(); _dsDaxuly.Clear(); #endregion CurrentPage4.TotalPages = Pager4.CalculateTotalPages(); CurrentPage4.PageIndex = Pager4.PageIndex; }
private void DelRecordsCongViec() { string sOrder = GetOrderString() == "" ? "" : " ORDER BY " + GetOrderString(); HPCBusinessLogic.DAL.T_IdieaDAL _T_IdieaDAL = new HPCBusinessLogic.DAL.T_IdieaDAL(); string ActionsCode = string.Empty; ArrayList ar = new ArrayList(); if (TabContainer1.ActiveTabIndex == 2) { foreach (DataGridItem m_Item in dgr_ListCongViec.Items) { CheckBox chk_select = (CheckBox)m_Item.FindControl("optSelect"); if (chk_select != null && chk_select.Checked) { ar.Add(double.Parse(dgr_ListCongViec.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString())); } } } for (int i = 0; i < ar.Count; i++) { double Diea_ID = double.Parse(ar[i].ToString()); _T_IdieaDAL.Update_Status_Detai(Diea_ID, 55, _user.UserID, DateTime.Now); ActionsCode = "[Danh sách Đề tài đã xử lý PV:]-->[Xóa Tin][Diea_ID:" + Diea_ID + "]"; UltilFunc.Log_Action(_user.UserID, _user.UserName, DateTime.Now, int.Parse(Request["Menu_ID"].ToString()), ActionsCode); } if (TabContainer1.ActiveTabIndex == 0) { LoadData_DangXuly(); } else if (TabContainer1.ActiveTabIndex == 1) { LoadData_Bitralai(); } else if (TabContainer1.ActiveTabIndex == 2) { LoadData_CongViec(); } // DANG XU LY DataSet _dsDangXuLy; _dsDangXuLy = _T_IdieaDAL.BindGridT_IdieaEditor(pages.PageIndex, pages.PageSize, BuildSQL(12, sOrder)); //System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "javascript", "javascript: SetInnerBaiDangxyLy(" + _dsReturn.Tables[1].Rows[0].ItemArray[0].ToString() + ");", true); // TRA LAI DataSet _dsReturn; DataSet _dsDaxuly; _dsReturn = _T_IdieaDAL.BindGridT_IdieaEditor(pages.PageIndex, pages.PageSize, BuildSQL(13, sOrder)); _dsDaxuly = _T_IdieaDAL.Bin_T_IdieaVersionDynamic(Pager4.PageIndex, Pager4.PageSize, BuildSQL(1, sOrder)); System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "javascript", "javascript: SetInnerBaiDangxyLy(" + _dsDangXuLy.Tables[1].Rows[0].ItemArray[0].ToString() + "," + _dsReturn.Tables[1].Rows[0].ItemArray[0].ToString() + "," + _dsDaxuly.Tables[1].Rows[0].ItemArray[0].ToString() + ");", true); _dsReturn.Clear(); _dsDangXuLy.Clear(); _dsDaxuly.Clear(); //END }