Beispiel #1
0
        //
        private void combobox_selectLSP(object sender, EventArgs e)
        {
            try
            {
                string err = "";
                dbThongKe = new BLL_ThongKe();
                dt        = new DataTable();
                dt.Clear();
                dt = dbThongKe.getThongKeTheoLSP(ref err, cmbchange.SelectedValue.ToString()).Tables[0];
                dgvThongKe.DataSource = dt;
                this.dgvThongKe.Columns["DonGia"].DefaultCellStyle.Format = "###,###,###,### VNĐ";
                //
                int tongtien = 0;
                //DataTable test = new DataTable();
                //test=dbThongKe.DoanhThuTheoLSP(ref err, cmbchange.SelectedValue.ToString()).Tables[0];
                tongtien = dbThongKe.DoanhThuTheoLSP(ref err, cmbchange.SelectedValue.ToString());

                lblDoanhThu.Text = tongtien.ToString();

                System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo("en-US");
                decimal value = decimal.Parse(lblDoanhThu.Text, System.Globalization.NumberStyles.AllowThousands);
                lblDoanhThu.Text = String.Format(culture, "{0:N0}", value) + " VNĐ";
            }
            catch { }
        }
        private void Frm_ThongKeDoanhThu_Load(object sender, EventArgs e)
        {
            bd = new BLL_ThongKe(Cls_Main.arrayPath, Cls_Main.fileType);

            HienThiDoanhThu(dtpTuNgay.Value, dtpDenNgay.Value);
            LoadDataForComboNhanVien();
        }