Esempio n. 1
0
        private void phieuchiBindingSource_CurrentChanged(object sender, EventArgs e)
        {
            if (this.isPhieuChiTab() && this.IsProcessChangingCurrentPCRow && this.phieuchiBindingSource.Current != null && !(this.phieuchiBindingSource.Current as DataRowView).IsNew)
            {
                QLCMND.CMND.phieuchiRow row = (QLCMND.CMND.phieuchiRow)((DataRowView)this.phieuchiBindingSource.Current).Row;

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

                this.HuyPC();
            }
        }
Esempio n. 2
0
        private void fillReportPhieuChi(RptPhieuChi rpt)
        {
            QLCMND.CMND.phieuchiRow row = (QLCMND.CMND.phieuchiRow)((DataRowView)this.phieuchiBindingSource.Current).Row;
            rpt.lblHoTen.Text = row.hoten.ToUpper();
            rpt.lblCMND.Text  = row.cmnd;

            if (!row.IscapngayNull())
            {
                rpt.lblCapNgay.Text = string.Format("{0:d}", row.capngay);
            }
            else
            {
                rpt.lblCapNgay.Text = "";
            }

            if (!row.IsnoicapNull())
            {
                rpt.lblNoiCap.Text = row.noicap;
            }
            else
            {
                rpt.lblNoiCap.Text = "";
            }


            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.IsnotkNull())
            {
                rpt.lblNoTK.Text = row.notk;
            }
            else
            {
                rpt.lblNoTK.Text = "";
            }
        }