示例#1
0
        private void LoadProject()
        {
            try
            {
                if (Utils.CStrDef(Session["Grouptype"]) != "1" && Utils.CStrDef(Session["Grouptype"]) != "9" && Utils.CStrDef(Session["Grouptype"]) != "14")
                {
                    var list = _BangLuongData.GetListByNV(txtKeyword.Value, Utils.CIntDef(ddlThang.SelectedValue), Utils.CIntDef(ddlNam.SelectedValue), GetUser(Utils.CIntDef(Session["Userid"])));

                    HttpContext.Current.Session["listBangLuong"] = list;
                    ASPxGridView1_project.DataSource             = list;
                    ASPxGridView1_project.DataBind();
                }
                else
                {
                    var list = _BangLuongData.GetListByYear(txtKeyword.Value, Utils.CIntDef(ddlThang.SelectedValue), Utils.CIntDef(ddlNam.SelectedValue));

                    HttpContext.Current.Session["listBangLuong"] = list;
                    ASPxGridView1_project.DataSource             = list;
                    ASPxGridView1_project.DataBind();
                }
            }
            catch //(Exception)
            {
                //throw;
            }
        }
示例#2
0
        private void LoadProject()
        {
            try
            {
                if (_Search != "" && _Search != null)
                {
                    txtKeyword.Value = _Search;
                }
                if (_Month != "" && _Month != null)
                {
                    ddlThang.SelectedValue = _Month;
                }
                if (_Year != "" && _Year != null)
                {
                    ddlNam.SelectedValue = _Year;
                }
                if (_congno != 0)
                {
                    ddlCongnno.SelectedValue = _congno.ToString();
                }
                if (_tinhtrang != 0)
                {
                    ddlTinhtrang.SelectedValue = _tinhtrang.ToString();
                }

                int sotin    = Utils.CIntDef(ddlCountPage.SelectedValue);
                int _idUser  = Utils.CIntDef(Session["Userid"], 0);
                int _idGroup = Utils.CIntDef(Session["Grouptype"], 0);
                if (_idGroup != 1 && _idGroup != 2 && _idGroup != 10 && _idGroup != 14)
                {
                    var list = _CongNoWebRepo.GetListByYear(Utils.CIntDef(ddlNam.SelectedValue), Utils.CIntDef(ddlThang.SelectedValue), _idUser, _Search, Utils.CIntDef(ddlTinhtrang.SelectedValue), Utils.CIntDef(ddlCongnno.SelectedValue));
                    //HttpContext.Current.Session["listCongNoWeb"] = list;
                    ASPxGridView1_project.DataSource = list.Skip(sotin * _page - sotin).Take(sotin);
                    ASPxGridView1_project.DataBind();

                    ltrPage.Text = change.result_web(list.Count, sotin, "danh-sach-cong-no-web", 0, _page, 1, ddlThang.SelectedValue, ddlNam.SelectedValue, "0", _Search, Utils.CIntDef(ddlTinhtrang.SelectedValue), Utils.CIntDef(ddlCongnno.SelectedValue));
                }
                else
                {
                    var list = _CongNoWebRepo.GetListByYear(Utils.CIntDef(ddlNam.SelectedValue), Utils.CIntDef(ddlThang.SelectedValue), -1, _Search, Utils.CIntDef(ddlTinhtrang.SelectedValue), Utils.CIntDef(ddlCongnno.SelectedValue));
                    //HttpContext.Current.Session["listCongNoWeb"] = list;
                    ASPxGridView1_project.DataSource = list.Skip(sotin * _page - sotin).Take(sotin);
                    ASPxGridView1_project.DataBind();

                    ltrPage.Text = change.result_web(list.Count, sotin, "danh-sach-cong-no-web", 0, _page, 1, ddlThang.SelectedValue, ddlNam.SelectedValue, "0", _Search, Utils.CIntDef(ddlTinhtrang.SelectedValue), Utils.CIntDef(ddlCongnno.SelectedValue));
                }
            }
            catch //(Exception)
            {
                //throw;
            }
        }
示例#3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     TestPermission();
     if (!IsPostBack)
     {
         LoadProject();
     }
     else
     {
         ASPxGridView1_project.DataSource = HttpContext.Current.Session["listBangLuong"];
         ASPxGridView1_project.DataBind();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     _id = Utils.CIntDef(Request.QueryString["id"]);
     if (!IsPostBack)
     {
         LoadProject();
         TestPermission();
     }
     else
     {
         ASPxGridView1_project.DataSource = HttpContext.Current.Session["listMember"];
         ASPxGridView1_project.DataBind();
     }
 }
        private void LoadProject()
        {
            try
            {
                var list = db.PROFILE_MEMBERs.Where(n => n.PROF_ID == _id).OrderByDescending(n => n.MEM_DATE);

                HttpContext.Current.Session["listMember"] = list;
                ASPxGridView1_project.DataSource          = list;
                ASPxGridView1_project.DataBind();
            }
            catch //(Exception)
            {
                //throw;
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     TestPermission();
     viewDebtCol();
     if (!IsPostBack)
     {
         pickdate_Begin.returnDate = Convert.ToDateTime("01/01/2015");
         fromDate = pickdate_Begin.returnDate;
         pickdate_End.returnDate = DateTime.Now;
         toDate = pickdate_End.returnDate;
         LoadProject();
     }
     else
     {
         ASPxGridView1_project.DataSource = HttpContext.Current.Session["listProj"];
         ASPxGridView1_project.DataBind();
     }
 }
        private void LoadProject()
        {
            try
            {
                int    _idUser  = Utils.CIntDef(Session["Userid"]);
                int    _idGroup = Utils.CIntDef(Session["Grouptype"], 0);
                string _keyword = txtKeyword.Value;
                if (_idGroup != 1 && _idGroup != 2 && _idGroup != 10 && _idGroup != 14 && _idGroup != 7)
                {
                    var list = (from n in db.CONG_NOs
                                where ((n.NV_KD == _idUser || n.NV_GN == _idUser || n.NV_KT == _idUser) &&
                                       (n.TEN_KH.Contains(_keyword) || n.MST.Contains(_keyword) || "" == _keyword) &&
                                       (n.MST != "" && n.MST != null))
                                select new
                    {
                        n.MST
                    }).OrderByDescending(n => n.MST).Distinct();

                    HttpContext.Current.Session["listListCty"] = list;
                    ASPxGridView1_project.DataSource           = list;
                    ASPxGridView1_project.DataBind();
                }
                else
                {
                    var list = (from n in db.CONG_NOs
                                where ((n.TEN_KH.Contains(_keyword) || n.MST.Contains(_keyword) || "" == _keyword) &&
                                       (n.MST != "" && n.MST != null))
                                select new
                    {
                        n.MST
                    }).OrderByDescending(n => n.MST).Distinct();

                    HttpContext.Current.Session["listListCty"] = list;
                    ASPxGridView1_project.DataSource           = list;
                    ASPxGridView1_project.DataBind();
                }
            }
            catch //(Exception)
            {
                //throw;
            }
        }
示例#8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            getCookies _getCookies = new getCookies();

            _getCookies.getCookiesNew();
            TestPermission();

            if (!IsPostBack)
            {
                pickdate_Begin.returnDate = Convert.ToDateTime("01/01/2015");
                fromDate = pickdate_Begin.returnDate;
                pickdate_End.returnDate = DateTime.Now;
                toDate = pickdate_End.returnDate;
                _getCookies.getCookiesNew();//cấp lại session
                LoadProject();
            }
            else
            {
                ASPxGridView1_project.DataSource = HttpContext.Current.Session["listThanhLyHopDong"];
                ASPxGridView1_project.DataBind();
            }
        }
示例#9
0
        private void LoadProject()
        {
            try
            {
                if (_Month != "" && _Month != null)
                {
                    ddlThang.SelectedValue = _Month;
                }
                if (_Year != "" && _Year != null)
                {
                    ddlNam.SelectedValue = _Year;
                }
                int sotin    = Utils.CIntDef(ddlCountPage.SelectedValue);
                int _idUser  = Utils.CIntDef(Session["Userid"], 0);
                int _idGroup = Utils.CIntDef(Session["Grouptype"], 0);
                if (_idGroup != 1 && _idGroup != 2 && _idGroup != 10 && _idGroup != 14)
                {
                    var list = _CongNoCKSData.GetListByYearNV(ddlNam.SelectedValue, ddlThang.SelectedValue, _idUser, _Search);
                    //HttpContext.Current.Session["listCongNoCKS"] = list;
                    ASPxGridView1_project.DataSource = list.Skip(sotin * _page - sotin).Take(sotin);
                    ASPxGridView1_project.DataBind();

                    ltrPage.Text = change.result_cks(list.Count, sotin, "danh-sach-cong-no-cks", 0, _page, 1, ddlThang.SelectedValue, ddlNam.SelectedValue, "0", _Search);
                }
                else
                {
                    var list = _CongNoCKSData.GetListByYear(ddlNam.SelectedValue, ddlThang.SelectedValue, _Search);
                    //HttpContext.Current.Session["listCongNoCKS"] = list;
                    ASPxGridView1_project.DataSource = list.Skip(sotin * _page - sotin).Take(sotin);
                    ASPxGridView1_project.DataBind();

                    ltrPage.Text = change.result_cks(list.Count, sotin, "danh-sach-cong-no-cks", 0, _page, 1, ddlThang.SelectedValue, ddlNam.SelectedValue, "0", _Search);
                }
            }
            catch //(Exception)
            {
                //throw;
            }
        }
        private void LoadProject()
        {
            try
            {
                int _typeprof = Utils.CIntDef(ddlTypeProf.SelectedValue);
                fromDate = pickdate_Begin.returnDate;
                toDate   = new DateTime(pickdate_End.returnDate.Year, pickdate_End.returnDate.Month, pickdate_End.returnDate.Day, 23, 59, 59);
                if (Utils.CStrDef(Session["Grouptype"]) == "3")
                {
                    var list = _ProjectData.GetListByName(txtKeyword.Value)
                               .Where(a => a.USER_ID == Utils.CIntDef(Session["Userid"]) &&
                                      (a.PROF_DATE <= toDate && a.PROF_DATE >= fromDate) &&
                                      (a.PROF_TYPE == _typeprof || 0 == _typeprof) &&
                                      (chkViewDebt.Checked ? a.PROF_COST1 != a.PROF_COST2 : "" == ""))
                               .OrderByDescending(n => n.PROF_DATE).OrderBy(n => n.PROF_STATUS == 12);

                    HttpContext.Current.Session["listProj"] = list;
                    ASPxGridView1_project.DataSource        = list;
                    ASPxGridView1_project.DataBind();
                }
                else
                {
                    var list = _ProjectData.GetListByName(txtKeyword.Value)
                               .Where(a => (a.PROF_DATE <= toDate && a.PROF_DATE >= fromDate) &&
                                      (a.PROF_TYPE == _typeprof || 0 == _typeprof) &&
                                      (chkViewDebt.Checked ? a.PROF_COST1 != a.PROF_COST2 : "" == ""))
                               .OrderByDescending(n => n.PROF_DATE).OrderBy(n => n.PROF_STATUS == 12);

                    HttpContext.Current.Session["listProj"] = list;
                    ASPxGridView1_project.DataSource        = list;
                    ASPxGridView1_project.DataBind();
                }
            }
            catch //(Exception)
            {
                //throw;
            }
        }
示例#11
0
        private void LoadProject()
        {
            try
            {
                int _idUser  = Utils.CIntDef(Session["Userid"]);
                int _idGroup = Utils.CIntDef(Session["Grouptype"], 0);
                fromDate = pickdate_Begin.returnDate;
                toDate   = new DateTime(pickdate_End.returnDate.Year, pickdate_End.returnDate.Month, pickdate_End.returnDate.Day, 23, 59, 59);
                if (_idGroup != 1 && _idGroup != 2 && _idGroup != 9 && _idGroup != 14 && _idUser != 24)
                {
                    var list = _MerThanhLyHopDongDVData.GetListAll()
                               .Where(a => a.USER_ID == Utils.CIntDef(Session["Userid"]) &&
                                      (a.MER_DATE <= toDate && a.MER_DATE >= fromDate) &&
                                      (a.MER_NAME2.Contains(txtKeyword.Value.ToUpper()) || a.MER_NAME2 == ""))
                               .OrderByDescending(n => n.MER_DATE);

                    HttpContext.Current.Session["listThanhLyHopDong"] = list;
                    ASPxGridView1_project.DataSource = list;
                    ASPxGridView1_project.DataBind();
                }
                else
                {
                    var list = _MerThanhLyHopDongDVData.GetListAll()
                               .Where(a => (a.MER_DATE <= toDate && a.MER_DATE >= fromDate) &&
                                      (a.MER_NAME2.Contains(txtKeyword.Value.ToUpper()) || a.MER_NAME2 == ""))
                               .OrderByDescending(n => n.MER_DATE);

                    HttpContext.Current.Session["listThanhLyHopDong"] = list;
                    ASPxGridView1_project.DataSource = list;
                    ASPxGridView1_project.DataBind();
                }
            }
            catch //(Exception)
            {
                //throw;
            }
        }