Esempio n. 1
0
        private void LoadData_CongViec()
        {
            string sOrder = GetOrderString1() == "" ? "" : " ORDER BY " + GetOrderString1();

            Pager4.PageSize = Global.MembersPerPage;
            HPCBusinessLogic.DAL.T_AllotmentDAL _DAL        = new HPCBusinessLogic.DAL.T_AllotmentDAL();
            HPCBusinessLogic.DAL.T_IdieaDAL     _T_IdieaDAL = new HPCBusinessLogic.DAL.T_IdieaDAL();
            DataSet _ds;

            _ds = _DAL.BindGridT_AllotmentEditor(Pager4.PageIndex, Pager4.PageSize, BuildSQLCongViec(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 = _DAL.BindGridT_AllotmentEditor(Pager4.PageIndex - 1, Pager4.PageSize, BuildSQLCongViec(sOrder));
            }
            dgr_tintuc4.DataSource = _ds;
            dgr_tintuc4.DataBind();
            Pager4.TotalRecords = CurrentPage4.TotalRecords = TotalRecords;

            #region DETAI BI TRA LAI
            TabPanel2.HeaderText = "Danh sách công việc (" + TotalRecords + ")";
            System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "javascript", "javascript: SetInnerDanhSach(" + TotalRecords + ");", true);
            DataSet _dsReturn1;
            DataSet _dsReturn2;
            DataSet _dsReturn3;
            _dsReturn1 = _T_IdieaDAL.BindGridT_IdieaEditor(Pager3.PageIndex - 1, Pager3.PageSize, BuildSQL(26, sOrder));
            this.TabPanel22.HeaderText = "Đề tài bị trả lại (" + _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 = _T_IdieaDAL.BindGridT_IdieaEditor(pages2.PageIndex - 1, pages2.PageSize, BuildSQL(23, sOrder));
            this.TabPanel1.HeaderText = "Đề tài đã hoàn thành (" + _dsReturn3.Tables[1].Rows[0].ItemArray[0].ToString() + ")";
            _dsReturn3.Clear();
            #endregion

            CurrentPage4.TotalPages = Pager4.CalculateTotalPages();
            CurrentPage4.PageIndex  = Pager4.PageIndex;
        }
Esempio n. 2
0
        protected void Delete_Click1(object sender, EventArgs e)
        {
            HPCBusinessLogic.DAL.T_AllotmentDAL _DAL = new HPCBusinessLogic.DAL.T_AllotmentDAL();

            string    sOrder = GetOrderString1() == "" ? "" : " ORDER BY " + GetOrderString1();
            ArrayList ar     = new ArrayList();

            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()));
                }
            }
            LoadData_CongViec();
            for (int i = 0; i < ar.Count; i++)
            {
                double _ID = double.Parse(ar[i].ToString());
                if (_DAL.GetOneFromT_AllotmentByID(int.Parse(_ID.ToString())).Status == 32)
                {
                    System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "Message", "alert('Bài chưa hoàn thành không thể xóa.!');", true);
                    return;
                }
                _DAL.Update_Status_tintuc(_ID, 55, _user.UserID, DateTime.Now);

                ActionsCode = "[Danh sách CV TPPV:]-->[Xóa CV][T_Allotment_ID:" + _ID + "]";
                UltilFunc.Log_Action(_user.UserID, _user.UserName, DateTime.Now, int.Parse(Request["Menu_ID"].ToString()), ActionsCode);
            }
            LoadData_CongViec();
            DataSet _dsReturn;

            _dsReturn = _DAL.BindGridT_AllotmentEditor(Pager4.PageIndex, Pager4.PageSize, BuildSQLCongViec(sOrder));
            System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "javascript", "javascript: SetInnerDanhSach(" + _dsReturn.Tables[1].Rows[0].ItemArray[0].ToString() + ");", true);
            _dsReturn.Clear();
        }
Esempio n. 3
0
        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();
        }