Esempio n. 1
0
        private void phieuthuBindingSource_CurrentChanged(object sender, EventArgs e)
        {
            if (this.isPhieuThuTab() && this.IsProcessChangingCurrentPTRow && this.phieuthuBindingSource.Current != null && !(this.phieuthuBindingSource.Current as DataRowView).IsNew)
            {
                QLCMND.CMND.phieuthuRow row = (QLCMND.CMND.phieuthuRow)((DataRowView)this.phieuthuBindingSource.Current).Row;

                if (!row.IsngaylapNull())
                {
                    this.lblPTNgayLap.Text = string.Format("Ngày {0} tháng {1} năm {2}", row.ngaylap.Day, row.ngaylap.Month, row.ngaylap.Year);
                }

                this.HuyPT();
            }
        }
Esempio n. 2
0
        private void fillReportPhieuThu(RptPhieuThu rpt)
        {
            QLCMND.CMND.phieuthuRow row = (QLCMND.CMND.phieuthuRow)((DataRowView)this.phieuthuBindingSource.Current).Row;
            rpt.lblHoTen.Text = row.hoten.ToUpper();

            if (!row.IsdiachiNull())
            {
                rpt.lblDiaChi.Text = row.diachi;
            }
            else
            {
                rpt.lblDiaChi.Text = "";
            }

            if (!row.IslydoNull())
            {
                rpt.lblLyDo.Text = row.lydo;
            }
            else
            {
                rpt.lblLyDo.Text = "";
            }

            if (!row.IschungtugocNull())
            {
                rpt.lblChungTuGoc.Text = row.chungtugoc;
            }
            else
            {
                rpt.lblChungTuGoc.Text = "";
            }

            if (!row.IskemtheoNull())
            {
                rpt.lblKemTheo.Text = row.kemtheo;
            }
            else
            {
                rpt.lblKemTheo.Text = "";
            }

            rpt.lblSoTien.Text    = string.Format("{0:n0}, đồng", row.sotien);
            rpt.lblSoTienChu.Text = "                                    " + VNCurrency.ToString((double)row.sotien);

            if (!row.IsngaylapNull())
            {
                rpt.lblNgayLap.Text = string.Format("Ngày {0} tháng {1} năm {2}", row.ngaylap.Day, row.ngaylap.Month, row.ngaylap.Year);
            }
            else
            {
                rpt.lblNgayLap.Text = "";
            }

            if (!row.IscotkNull())
            {
                rpt.lblCoTK.Text = row.cotk;
            }
            else
            {
                rpt.lblCoTK.Text = "";
            }
        }