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 }
private void Load_DaPhanViec() { string sOrder = GetOrderString() == "" ? "" : " ORDER BY " + GetOrderString(); Pager3.PageSize = Global.MembersPerPage; HPCBusinessLogic.DAL.T_IdieaDAL _T_IdieaDAL = new HPCBusinessLogic.DAL.T_IdieaDAL(); HPCBusinessLogic.DAL.T_AllotmentDAL _DAL = new HPCBusinessLogic.DAL.T_AllotmentDAL(); DataSet _ds; _ds = _T_IdieaDAL.BindGridT_IdieaEditor(Pager3.PageIndex, Pager3.PageSize, BuildSQL(26, 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_IdieaDAL.BindGridT_IdieaEditor(Pager3.PageIndex - 1, Pager3.PageSize, BuildSQL(26, sOrder)); } dgr_tintuc3.DataSource = _ds; dgr_tintuc3.DataBind(); Pager3.TotalRecords = CurrentPage3.TotalRecords = TotalRecords; #region DETAI BI TRA LAI TabPanel22.HeaderText = "Đề tài bị trả lại (" + TotalRecords + ")"; System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "javascript", "javascript: SetInnerBaiDaPhanCong(" + TotalRecords + ");", true); DataSet _dsReturn1; DataSet _dsReturn2; DataSet _dsReturn3; _dsReturn1 = _T_IdieaDAL.BindGridT_IdieaEditor(pages2.PageIndex, pages2.PageSize, BuildSQL(23, sOrder)); this.TabPanel1.HeaderText = "Đề tài đã hoàn thành (" + _dsReturn1.Tables[1].Rows[0].ItemArray[0].ToString() + ")"; _dsReturn1.Clear(); _dsReturn2 = _T_IdieaDAL.BindGridT_IdieaEditor(pages.PageIndex - 1, pages.PageSize, BuildSQL(22, sOrder)); this.tabpnltinXuly.HeaderText = "Đề tài chưa phân công công việc (" + _dsReturn2.Tables[1].Rows[0].ItemArray[0].ToString() + ")"; _dsReturn2.Clear(); _dsReturn3 = _DAL.BindGridT_AllotmentEditor(Pager4.PageIndex, Pager4.PageSize, BuildSQLCongViec(sOrder)); this.TabPanel2.HeaderText = "Danh sách công việc (" + _dsReturn3.Tables[1].Rows[0].ItemArray[0].ToString() + ")"; _dsReturn3.Clear(); #endregion CurrentPage3.TotalPages = Pager3.CalculateTotalPages(); CurrentPage3.PageIndex = Pager3.PageIndex; }
private void DelRecordsCheckedBox() { HPCBusinessLogic.DAL.T_IdieaDAL _T_IdieaDAL = new HPCBusinessLogic.DAL.T_IdieaDAL(); HPCBusinessLogic.DAL.T_AllotmentDAL _DAL = new HPCBusinessLogic.DAL.T_AllotmentDAL(); string sOrder = GetOrderString() == "" ? "" : " ORDER BY " + GetOrderString(); string sOrder1 = GetOrderString1() == "" ? "" : " ORDER BY " + GetOrderString1(); ArrayList ar = new ArrayList(); if (TabContainer1.ActiveTabIndex == 0) { foreach (DataGridItem m_Item in dgr_tintuc1.Items) { CheckBox chk_select = (CheckBox)m_Item.FindControl("optSelect"); if (chk_select != null && chk_select.Checked) { ar.Add(double.Parse(dgr_tintuc1.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString())); } } } else if (TabContainer1.ActiveTabIndex == 1) { foreach (DataGridItem m_Item in dgr_tintuc2.Items) { CheckBox chk_select = (CheckBox)m_Item.FindControl("optSelect"); if (chk_select != null && chk_select.Checked) { ar.Add(double.Parse(dgr_tintuc2.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString())); } } } else if (TabContainer1.ActiveTabIndex == 2) { foreach (DataGridItem m_Item in dgr_tintuc3.Items) { CheckBox chk_select = (CheckBox)m_Item.FindControl("optSelect"); if (chk_select != null && chk_select.Checked) { ar.Add(double.Parse(dgr_tintuc3.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString())); } } } else if (TabContainer1.ActiveTabIndex == 3) { foreach (DataGridItem m_Item in dgr_tintuc4.Items) { CheckBox chk_select = (CheckBox)m_Item.FindControl("optSelect"); if (chk_select != null && chk_select.Checked) { ar.Add(double.Parse(dgr_tintuc4.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString())); } } } if (TabContainer1.ActiveTabIndex == 0) { LoadData_DangXuly(); } else if (TabContainer1.ActiveTabIndex == 1) { LoadData_Bitralai(); } else if (TabContainer1.ActiveTabIndex == 2) { Load_DaPhanViec(); } else if (TabContainer1.ActiveTabIndex == 3) { LoadData_CongViec(); } for (int i = 0; i < ar.Count; i++) { double Diea_ID = double.Parse(ar[i].ToString()); _T_IdieaDAL.Update_Status_tintuc(Diea_ID, 55, _user.UserID, DateTime.Now, 0); _T_IdieaDAL.Insert_Version_From_T_idiea_WithUserModify(Diea_ID, 2, 55, _user.UserID, DateTime.Now); ActionsCode = "[Danh sách Đề tài đang chờ xử lý TPPV:]-->[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) { Load_DaPhanViec(); } else if (TabContainer1.ActiveTabIndex == 3) { LoadData_CongViec(); } DataSet _dsReturn1; DataSet _dsReturn2; DataSet _dsReturn3; DataSet _dsReturn4; _dsReturn1 = _T_IdieaDAL.BindGridT_IdieaEditor(pages.PageIndex, pages.PageSize, BuildSQL(22, sOrder)); _dsReturn2 = _T_IdieaDAL.BindGridT_IdieaEditor(pages2.PageIndex, pages2.PageSize, BuildSQL(23, sOrder)); _dsReturn3 = _T_IdieaDAL.BindGridT_IdieaEditor(Pager3.PageIndex - 1, Pager3.PageSize, BuildSQL(26, sOrder)); _dsReturn4 = _DAL.BindGridT_AllotmentEditor(Pager4.PageIndex, Pager4.PageSize, BuildSQLCongViec(sOrder1)); System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "javascript", "javascript: SetInnerDuyetDetaiTPPV(" + _dsReturn1.Tables[1].Rows[0].ItemArray[0].ToString() + "," + _dsReturn2.Tables[1].Rows[0].ItemArray[0].ToString() + "," + _dsReturn3.Tables[1].Rows[0].ItemArray[0].ToString() + "," + _dsReturn4.Tables[1].Rows[0].ItemArray[0].ToString() + ");", true); _dsReturn1.Clear(); _dsReturn2.Clear(); _dsReturn3.Clear(); _dsReturn4.Clear(); }
private void Gui_TraLai() { HPCBusinessLogic.DAL.T_IdieaDAL _T_IdieaDAL = new HPCBusinessLogic.DAL.T_IdieaDAL(); ArrayList ar = new ArrayList(); string sOrder = GetOrderString() == "" ? "" : " ORDER BY " + GetOrderString(); if (TabContainer1.ActiveTabIndex == 0) { foreach (DataGridItem m_Item in dgr_tintuc1.Items) { CheckBox chk_select = (CheckBox)m_Item.FindControl("optSelect"); if (chk_select != null && chk_select.Checked) { ar.Add(double.Parse(dgr_tintuc1.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString())); } } } else if (TabContainer1.ActiveTabIndex == 1) { foreach (DataGridItem m_Item in dgr_tintuc2.Items) { CheckBox chk_select = (CheckBox)m_Item.FindControl("optSelect"); if (chk_select != null && chk_select.Checked) { ar.Add(double.Parse(dgr_tintuc2.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString())); } } } else if (TabContainer1.ActiveTabIndex == 2) { foreach (DataGridItem m_Item in dgr_tintuc3.Items) { CheckBox chk_select = (CheckBox)m_Item.FindControl("optSelect"); if (chk_select != null && chk_select.Checked) { ar.Add(double.Parse(dgr_tintuc3.DataKeys[int.Parse(m_Item.ItemIndex.ToString())].ToString())); } } } if (TabContainer1.ActiveTabIndex == 0) { LoadData_DangXuly(); } else if (TabContainer1.ActiveTabIndex == 1) { LoadData_Bitralai(); } else if (TabContainer1.ActiveTabIndex == 2) { Load_DaPhanViec(); } for (int i = 0; i < ar.Count; i++) { double Diea_ID = double.Parse(ar[i].ToString()); if (_T_IdieaDAL.GetOneFromT_IdieaByID(int.Parse(Diea_ID.ToString())).Diea_Lock == true && _T_IdieaDAL.GetOneFromT_IdieaByID(int.Parse(Diea_ID.ToString())).User_Edit != _user.UserID) { System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "Message", "alert('Bài đang có người làm việc.!');", true); return; } _T_IdieaDAL.IsLock(Diea_ID, 0, _user.UserID, DateTime.Now); _T_IdieaDAL.Update_Status_tintuc(Diea_ID, 33, _user.UserID, DateTime.Now, 0); _T_IdieaDAL.Insert_Version_From_T_idiea_WithUserModify(Diea_ID, 2, 33, _user.UserID, DateTime.Now); ActionsCode = "[Danh sách Đề tài đang chờ xử lý TPPV:]-->[Trả Lại(PV)][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(); DataSet _dsReturn; _dsReturn = _T_IdieaDAL.BindGridT_IdieaEditor(pages.PageIndex, pages.PageSize, BuildSQL(22, sOrder)); System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "javascript", "javascript: SetInnerBaiChuaPhanCong(" + _dsReturn.Tables[1].Rows[0].ItemArray[0].ToString() + ");", true); _dsReturn.Clear(); } else if (TabContainer1.ActiveTabIndex == 1) { LoadData_Bitralai(); DataSet _dsReturn; _dsReturn = _T_IdieaDAL.BindGridT_IdieaEditor(pages2.PageIndex, pages2.PageSize, BuildSQL(23, sOrder)); System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "javascript", "javascript: SetInnerBaiDaHoanThanh(" + _dsReturn.Tables[1].Rows[0].ItemArray[0].ToString() + ");", true); _dsReturn.Clear(); } else if (TabContainer1.ActiveTabIndex == 2) { Load_DaPhanViec(); DataSet _dsReturn; _dsReturn = _T_IdieaDAL.BindGridT_IdieaEditor(Pager3.PageIndex, Pager3.PageSize, BuildSQL(26, sOrder)); System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "javascript", "javascript: SetInnerBaiDaPhanCong(" + _dsReturn.Tables[1].Rows[0].ItemArray[0].ToString() + ");", true); _dsReturn.Clear(); } }