Example #1
0
        private void LoadBangThongKeXau()
        {
            GopYBUS        gopYBUS = new GopYBUS();
            List <GopYDTO> allXau  = gopYBUS.getAllCommentXauByBangThongKe(Int32.Parse(cbMaThongKe.SelectedValue.ToString()));

            grvCmtXau.DataSource = allXau;

            grvCmtXau.Columns.Remove("GhiNhanTangQua");
        }
Example #2
0
        /// <summary>
        /// thong ke
        /// </summary>
        private void LoadBangThongKeTot()
        {
            GopYBUS        gopYBUS = new GopYBUS();
            List <GopYDTO> allTot  = gopYBUS.getAllCommentTotByBangThongKe(Int32.Parse(cbMaThongKe.SelectedValue.ToString()));

            grvCmtTot.DataSource = allTot;

            grvCmtTot.Columns.Remove("GhiNhanXoa");
        }
Example #3
0
        private void btnXuLyThongKe_Click(object sender, EventArgs e)
        {
            GopYBUS gopYBUS = new GopYBUS();
            var     result  = gopYBUS.getByDate(dTimeStartThongKeCmt.Value, dTimeEndThongKeCmt.Value);

            grvAllComments.Refresh();
            grvAllComments.DataSource = result;
            grvAllComments.Columns.Remove("GhiNhanTangQua");
            grvAllComments.Columns.Remove("GhiNhanXoa");
        }
Example #4
0
        private void Load_DSCommentThongKe()
        {
            GopYBUS gopYBUS = new GopYBUS();

            List <GopYDTO> allGopY = gopYBUS.getByDate(dTimeStartThongKeCmt.Value, dTimeEndThongKeCmt.Value);

            grvAllComments.DataSource = null;
            grvAllComments.DataSource = allGopY;
            grvAllComments.Columns.Remove("GhiNhanTangQua");
            grvAllComments.Columns.Remove("GhiNhanXoa");
        }
Example #5
0
        private void btnGhiNhanTangQua_Click(object sender, EventArgs e)
        {
            int rowIndex = grvCmtTot.CurrentCell.RowIndex;

            string  maGopY  = grvCmtTot.Rows[rowIndex].Cells["MAGOPY"].FormattedValue.ToString();
            int     magopy  = int.Parse(maGopY);
            GopYBUS gopYBUS = new GopYBUS();

            gopYBUS.UpdateTangQua(magopy);
            MessageBox.Show("Đã ghi nhận tặng quà");
            LoadBangThongKeTot();
        }
Example #6
0
        private void btnXoaVaChan_Click(object sender, EventArgs e)
        {
            int rowIndex = grvCmtXau.CurrentCell.RowIndex;

            string  maGopY  = grvCmtXau.Rows[rowIndex].Cells["MAGOPY"].FormattedValue.ToString();
            int     magopy  = int.Parse(maGopY);
            GopYBUS gopYBUS = new GopYBUS();

            gopYBUS.UpdateXacNhanXoaGopY(magopy);
            KhachHangBUS khachHangBUS = new KhachHangBUS();

            khachHangBUS.UpdateKhoaComment(magopy);
            MessageBox.Show("Đã ghi nhận xóa và ngăn khách hàng comment");
            LoadBangThongKeXau();
        }
Example #7
0
        private void grvAllComments_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            GopYBUS gopYBUS = new GopYBUS();

            if (grvAllComments.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null)
            {
                grvAllComments.CurrentRow.Selected = true;
                bool   flagxau = (bool)grvAllComments.Rows[e.RowIndex].Cells["DANHDAUCOMMENTXAU"].FormattedValue;
                string maGopY  = grvAllComments.Rows[e.RowIndex].Cells["MAGOPY"].FormattedValue.ToString();
                if (flagxau == false)
                {
                    gopYBUS.UpdateCmtXauTot(int.Parse(maGopY), true);
                }
                else
                {
                    gopYBUS.UpdateCmtXauTot(int.Parse(maGopY), false);
                }
                Load_DSCommentThongKe();
            }
        }