protected void btnLoad_Click(object sender, EventArgs e)
        {
            Session["AutoDisplay_BDCS"] = true;
            Session["BDCS_ID"]          = txtID.Text;
            Session["BDCS_MaSo"]        = txtMaSo.Text;
            Session["BDCS_GioiTinh"]    = ddlGioiTinh.SelectedValue;
            Session["BDCS_LoaiCa"]      = Config.GetSelectedValues(ddlLoaiCa);
            Session["BDCS_Chuong"]      = Config.GetSelectedValues(ddlChuong);
            Session["BDCS_CaMe"]        = Config.GetSelectedValues(ddlCaMe);
            Session["BDCS_TrangThai"]   = Config.GetSelectedValues(ddlStatus);

            grvDanhSach.DataSourceID = "odsDanhSach";
            grvDanhSach.PageSize     = int.Parse(ddlPageSize.SelectedValue);
            string strWhereClause = LoadODSParameters();

            if (strWhereClause != "")
            {
                odsDanhSach.SelectParameters["WhereClause"].DefaultValue = strWhereClause;
                lblTongSo.Text      = CaSauDataObject.CountBienDong(strWhereClause).ToString();
                grvDanhSach.Visible = true;
            }
            else
            {
                grvDanhSach.Visible = false;
                lblTongSo.Text      = "0";
            }
        }
Example #2
0
        protected void btnLoad_Click(object sender, EventArgs e)
        {
            Session["AutoDisplay_GMC"] = true;
            Session["GMC_TuNgay"]      = txtNgayGietMoFrom.Text;
            Session["GMC_DenNgay"]     = txtNgayGietMoTo.Text;
            Session["GMC_BB"]          = txtBienBan.Text;
            Session["GMC_LoaiCa"]      = Config.GetSelectedValues(ddlLoaiCa);

            grvDanhSach.DataSourceID = "odsDanhSach";
            grvDanhSach.PageSize     = int.Parse(ddlPageSize.SelectedValue);
            string strWhereClause = LoadODSParameters();

            odsDanhSach.SelectParameters["WhereClause"].DefaultValue = strWhereClause;
            lblTongSo.Text = CaSauDataObject.CountGietMoCa(strWhereClause).ToString();

            if (Session["GMC_SortExpression"] != null && Session["GMC_SortDirection"] != null)
            {
                SortDirection sd = SortDirection.Descending;
                if (Session["GMC_SortDirection"].ToString() == "ASC")
                {
                    sd = SortDirection.Ascending;
                }
                grvDanhSach.Sort(Session["GMC_SortExpression"].ToString(), sd);
            }
        }
Example #3
0
        protected void btnLoad1_Click(object sender, EventArgs e)
        {
            Session["AutoDisplay_CS"]    = true;
            Session["CSAdmin_ID"]        = txtID.Text;
            Session["CSAdmin_MaSo"]      = txtMaSo.Text;
            Session["CSAdmin_GioiTinh"]  = ddlGioiTinh.SelectedValue;
            Session["CSAdmin_LoaiCa"]    = Config.GetSelectedValues(ddlLoaiCa);
            Session["CSAdmin_Chuong"]    = Config.GetSelectedValues(ddlChuong);
            Session["CSAdmin_CaMe"]      = Config.GetSelectedValues(ddlCaMe);
            Session["CSAdmin_TrangThai"] = Config.GetSelectedValues(ddlStatus);

            grvDanhSach.DataSourceID = "odsDanhSach";
            grvDanhSach.PageSize     = int.Parse(ddlPageSize.SelectedValue);
            string strWhereClause = LoadODSParameters();

            if (strWhereClause != "")
            {
                if (txtTruocNgay.Text == "")
                {
                    txtTruocNgay.Text = DateTime.Now.AddDays(1).ToString("dd/MM/yyyy HH:mm:ss");
                }
                odsDanhSach.SelectParameters["WhereClause"].DefaultValue = strWhereClause;
                odsDanhSach.SelectParameters["Date"].DefaultValue        = txtTruocNgay.Text.Trim();
                lblTongSo.Text      = CaSauDataObject.Count(strWhereClause, txtTruocNgay.Text.Trim()).ToString();
                grvDanhSach.Visible = true;
            }
            else
            {
                grvDanhSach.Visible = false;
                lblTongSo.Text      = "0";
            }
            udpDanhSach.Update();
            btnBoToanBo_Click(null, null);
        }
        protected void btnLoad_Click(object sender, EventArgs e)
        {
            Session["AutoDisplay_CSBan"] = true;
            Session["CSBan_MaSo"]        = txtMaSo.Text;
            Session["CSBan_GioiTinh"]    = ddlGioiTinh.SelectedValue;
            Session["CSBan_LoaiCa"]      = ddlLoaiCa.SelectedValue;
            Session["CSBan_Chuong"]      = ddlChuong.SelectedValue;
            Session["CSBan_CaMe"]        = ddlCaMe.SelectedValue;

            grvDanhSach.DataSourceID = "odsDanhSach";
            grvDanhSach.PageSize     = int.Parse(ddlPageSize.SelectedValue);
            string strWhereClause = LoadODSParameters();

            if (strWhereClause != "")
            {
                odsDanhSach.SelectParameters["WhereClause"].DefaultValue = strWhereClause;
                lblTongSo.Text      = CaSauDataObject.Count_HienTai(strWhereClause).ToString();
                grvDanhSach.Visible = true;
            }
            else
            {
                grvDanhSach.Visible = false;
                lblTongSo.Text      = "0";
            }
            udpDanhSach.Update();
        }
Example #5
0
        protected void btnLoad_Click(object sender, EventArgs e)
        {
            tblLDC = csCont.LoadLyDoChet(1);
            Session["AutoDisplay_CSChet"] = true;
            Session["CSChet_ID"]          = txtID.Text;
            Session["CSChet_MaSo"]        = txtMaSo.Text;
            Session["CSChet_GioiTinh"]    = ddlGioiTinh.SelectedValue;
            Session["CSChet_LoaiCa"]      = Config.GetSelectedValues(ddlLoaiCa);
            Session["CSChet_Chuong"]      = Config.GetSelectedValues(ddlChuong);
            Session["CSChet_CaMe"]        = Config.GetSelectedValues(ddlCaMe);
            Session["CSChet_BienBan"]     = Config.GetSelectedValues(lstBienBan);

            grvDanhSach.PageSize = int.Parse(ddlPageSize.SelectedValue);
            if (ddlRowStatus.SelectedValue == "1")
            {
                grvDanhSach.Columns[17].SortExpression = "[Status] DESC";
                grvDanhSach.Columns[21].SortExpression = "[LatestChange] DESC";
                string strWhereClause = LoadODSParameters();
                grvDanhSach.DataSourceID = "odsDanhSach";
                odsDanhSach.SelectParameters["WhereClause"].DefaultValue = strWhereClause;
                lblTongSo.Text = CaSauDataObject.CountCaChet_HienTai(strWhereClause).ToString();
            }
            else
            {
                grvDanhSach.Columns[17].SortExpression = "[c.Status] DESC";
                grvDanhSach.Columns[21].SortExpression = "[c.Ngay] DESC";
                string strWhereClause = LoadODSParametersDelete();
                grvDanhSach.DataSourceID = "odsDanhSachDelete";
                odsDanhSachDelete.SelectParameters["WhereClause"].DefaultValue = strWhereClause;
                lblTongSo.Text    = CaSauDataObject.CountCaChetDelete(strWhereClause).ToString();
                btnKhoa.Visible   = false;
                btnMoKhoa.Visible = false;
            }
        }
Example #6
0
        protected void btnLoad_Click(object sender, EventArgs e)
        {
            Session["AutoDisplay_CSA"]    = true;
            Session["CSAn_NgayChoAnFrom"] = txtNgayChoAnFrom.Text;
            Session["CSAn_NgayChoAnTo"]   = txtNgayChoAnTo.Text;
            Session["CSAn_LoaiCa"]        = Config.GetSelectedValues(ddlLoaiCa);
            Session["CSAn_NguoiChoAn"]    = Config.GetSelectedValues(ddlNguoiChoAn);

            grvDanhSach.DataSourceID = "odsDanhSach";
            grvDanhSach.PageSize     = int.Parse(ddlPageSize.SelectedValue);
            string strWhereClause = LoadODSParameters();

            odsDanhSach.SelectParameters["WhereClause"].DefaultValue = strWhereClause;
            lblTongSo.Text = CaSauDataObject.CountCaSauAn(strWhereClause).ToString();
            //udpDanhSach.Update();

            if (Session["CSAn_SortExpression"] != null && Session["CSAn_SortDirection"] != null)
            {
                SortDirection sd = SortDirection.Descending;
                if (Session["CSAn_SortDirection"].ToString() == "ASC")
                {
                    sd = SortDirection.Ascending;
                }
                grvDanhSach.Sort(Session["CSAn_SortExpression"].ToString(), sd);
            }
        }
        protected void btnLoad_Click(object sender, EventArgs e)
        {
            grvDanhSach.DataSourceID = "odsDanhSach";
            grvDanhSach.PageSize     = int.Parse(ddlPageSize.SelectedValue);
            string strWhereClause = LoadODSParameters();

            if (strWhereClause != "")
            {
                odsDanhSach.SelectParameters["WhereClause"].DefaultValue = strWhereClause;
                lblTongSo.Text      = CaSauDataObject.Count_HienTai(strWhereClause).ToString();
                grvDanhSach.Visible = true;
            }
            else
            {
                grvDanhSach.Visible = false;
                lblTongSo.Text      = "0";
            }
        }
        protected void btnLoad_Click(object sender, EventArgs e)
        {
            Session["AutoDisplay_Note"] = true;
            Session["Note_RowStatus"]   = ddlRowStatus.SelectedValue;
            Session["Note_Chuong"]      = Config.GetSelectedValues(ddlChuong);
            Session["Note_NgayTu"]      = txtNgayFrom.Text;
            Session["Note_NgayDen"]     = txtNgayTo.Text;

            grvDanhSach.PageSize = int.Parse(ddlPageSize.SelectedValue);
            string strWhereClause = LoadODSParameters();

            if (ddlRowStatus.SelectedValue == "1")
            {
                grvDanhSach.DataSourceID = "odsDanhSach";
                odsDanhSach.SelectParameters["WhereClause"].DefaultValue = strWhereClause;
                lblTongSo.Text = CaSauDataObject.CountNote(strWhereClause).ToString();
                if (lblTongSo.Text == "0")
                {
                    btnKhoa.Visible   = false;
                    btnMoKhoa.Visible = false;
                    grvDanhSach.Columns[3].Visible = false;
                }
            }
            else
            {
                grvDanhSach.DataSourceID = "odsDanhSachDelete";
                odsDanhSachDelete.SelectParameters["WhereClause"].DefaultValue = strWhereClause;
                lblTongSo.Text    = CaSauDataObject.CountNoteDelete(strWhereClause).ToString();
                btnKhoa.Visible   = false;
                btnMoKhoa.Visible = false;
                grvDanhSach.Columns[3].Visible = false;
            }

            if (Session["Note_SortExpression"] != null && Session["Note_SortDirection"] != null)
            {
                SortDirection sd = SortDirection.Descending;
                if (Session["Note_SortDirection"].ToString() == "ASC")
                {
                    sd = SortDirection.Ascending;
                }
                grvDanhSach.Sort(Session["Note_SortExpression"].ToString(), sd);
            }
        }
        protected void btnLoad_Click(object sender, EventArgs e)
        {
            Session["AutoDisplay_CSD"] = true;
            Session["CSDe_RowStatus"]  = ddlRowStatus.SelectedValue;
            Session["CSDe_LoaiCa"]     = Config.GetSelectedValues(ddlLoaiCa);
            Session["CSDe_Chuong"]     = Config.GetSelectedValues(ddlChuong);
            Session["CSDe_NgayApTu"]   = txtNgayApFrom.Text;
            Session["CSDe_NgayApDen"]  = txtNgayApTo.Text;
            Session["CSDe_TrangThai"]  = ddlStatus.SelectedValue;
            Session["CSDe_PhongAp"]    = Config.GetSelectedValues(ddlPhongAp);
            Session["CSDe_NhanVien"]   = Config.GetSelectedValues(ddlNhanVien);

            grvDanhSach.PageSize  = int.Parse(ddlPageSize.SelectedValue);
            grvDanhSach.PageIndex = 0;
            string strWhereClause = LoadODSParameters();

            if (ddlRowStatus.SelectedValue == "1")
            {
                grvDanhSach.DataSourceID = "odsDanhSach";
                odsDanhSach.SelectParameters["WhereClause"].DefaultValue = strWhereClause;
                lblTongSo.Text = CaSauDataObject.CountCaSauDe(strWhereClause).ToString();
            }
            else
            {
                grvDanhSach.DataSourceID = "odsDanhSachDelete";
                odsDanhSachDelete.SelectParameters["WhereClause"].DefaultValue = strWhereClause;
                lblTongSo.Text    = CaSauDataObject.CountCaSauDeDelete(strWhereClause).ToString();
                btnKhoa.Visible   = false;
                btnMoKhoa.Visible = false;
            }

            if (Session["CSDe_SortExpression"] != null && Session["CSDe_SortDirection"] != null)
            {
                SortDirection sd = SortDirection.Descending;
                if (Session["CSDe_SortDirection"].ToString() == "ASC")
                {
                    sd = SortDirection.Ascending;
                }
                grvDanhSach.Sort(Session["CSDe_SortExpression"].ToString(), sd);
            }
        }