Esempio n. 1
0
        public void addTrinhKy_OnButtonClick()
        {
            if (mv_oRptFieldObj == null)
            {
                return;
            }

            try
            {
                //Hien form de thay doi tuy chon ky
                frm_SignInfor sv_fTuyChonKy = new frm_SignInfor();
                sv_fTuyChonKy.txtBaoCao.Text = this.mv_oNguoiKy.mv_TEN_BIEUBC;
                //sv_fTuyChonKy.txtCoChu.Text = Me.mv_oNguoiKy.mv_CO_CHU.ToString()

                //sv_fTuyChonKy.txtKieuFont.Text = Me.mv_oNguoiKy.mv_KIEU_CHU
                //#$X$# cua XuanDT, khong duoc doi
                sv_fTuyChonKy.txtTrinhky.Rtf = this.mv_oNguoiKy.mv_NOI_DUNG;
                //sv_fTuyChonKy.txtTenFont.Text = Me.mv_oNguoiKy.mv_FONT_CHU
                sv_fTuyChonKy.mv_sFontName  = this.mv_oNguoiKy.mv_FONT_CHU;
                sv_fTuyChonKy.mv_sFontSize  = this.mv_oNguoiKy.mv_CO_CHU.ToString();
                sv_fTuyChonKy.mv_sFontStyle = this.mv_oNguoiKy.mv_KIEU_CHU;
                //sv_fTuyChonKy.mv_sSoLuongCanIn=this.mv_oNguoiKy.mv
                sv_fTuyChonKy.ShowDialog();
                if (sv_fTuyChonKy.mv_bChapNhan)
                {
                    this.mv_oNguoiKy.mv_TEN_BIEUBC = sv_fTuyChonKy.txtBaoCao.Text.Trim();
                    if (!mv_bAdded)
                    {
                        this.mv_oNguoiKy.mv_NOI_DUNG = sv_fTuyChonKy.txtTrinhky.Rtf;
                    }
                    else
                    {
                        this.mv_oNguoiKy.mv_NOI_DUNG = sv_fTuyChonKy.txtTrinhky.Rtf;
                    }
                    if (sv_fTuyChonKy.chkGhiLai.Checked == true)
                    {
                        this.mv_oNguoiKy.updateRPTtoDB();
                    }
                    SetParamAgain(RptDoc.ParameterFields);
                    //if (mv_bSetContent)
                    //{
                    //    mv_oRptDoc.DataDefinition.FormulaFields["Formula_1"].Text =  mv_oNguoiKy.mv_NOI_DUNG.Replace("&NHANVIEN", globalVariables.gv_strTenNhanvien);
                    //}
                    //else
                    //{
                    //    mv_oRptDoc.DataDefinition.FormulaFields["Formula_1"].Text = "";
                    //}
                    //mv_oViewDoc.ReportSource = Nothing
                    mv_oViewDoc.ReportSource = RptDoc;
                }
            }
            catch (Exception ex)
            {
            }
        }
Esempio n. 2
0
        public void addTrinhKy_OnButtonClick()
        {
            if (mv_oRptFieldObj == null)
            {
                Utility.ShowMsg("Hệ thống không phát hiện trình ký trên báo cáo này. Mời bạn kiểm tra lại");
                return;
            }

            try
            {
                //Hien form de thay doi tuy chon ky
                frm_SignInfor sv_fTuyChonKy = new frm_SignInfor();

                sv_fTuyChonKy.txtBaoCao.Text = Utility.DoTrim(this.mv_oNguoiKy.mv_TEN_BIEUBC) == "" ? mv_sReportFileName : Utility.DoTrim(this.mv_oNguoiKy.mv_TEN_BIEUBC);
                //sv_fTuyChonKy.txtCoChu.Text = Me.mv_oNguoiKy.mv_CO_CHU.ToString()

                //sv_fTuyChonKy.txtKieuFont.Text = Me.mv_oNguoiKy.mv_KIEU_CHU
                //#$X$# cua XuanDT, khong duoc doi
                sv_fTuyChonKy.txtTrinhky.Rtf = this.mv_oNguoiKy.mv_NOI_DUNG;

                //sv_fTuyChonKy.txtTenFont.Text = Me.mv_oNguoiKy.mv_FONT_CHU
                sv_fTuyChonKy.mv_sFontName  = this.mv_oNguoiKy.mv_FONT_CHU;
                sv_fTuyChonKy.mv_sFontSize  = this.mv_oNguoiKy.mv_CO_CHU.ToString();
                sv_fTuyChonKy.mv_sFontStyle = this.mv_oNguoiKy.mv_KIEU_CHU;
                //sv_fTuyChonKy.mv_sSoLuongCanIn=this.mv_oNguoiKy.mv
                sv_fTuyChonKy.ShowDialog();
                if (sv_fTuyChonKy.mv_bChapNhan)
                {
                    this.mv_oNguoiKy.mv_TEN_BIEUBC = sv_fTuyChonKy.txtBaoCao.Text.Trim();
                    if (!mv_bAdded)
                    {
                        this.mv_oNguoiKy.mv_NOI_DUNG = sv_fTuyChonKy.txtTrinhky.Rtf;
                    }
                    else
                    {
                        this.mv_oNguoiKy.mv_NOI_DUNG = sv_fTuyChonKy.txtTrinhky.Rtf;
                    }
                    if (sv_fTuyChonKy.chkGhiLai.Checked == true)
                    {
                        this.mv_oNguoiKy.updateRPTtoDB();
                    }
                    SetParamAgain();

                    this.crptViewer.ReportSource = RptDoc;
                }
            }
            catch (Exception ex)
            {
                Utility.ShowMsg("Lỗi:" + ex.Message);
            }
        }
Esempio n. 3
0
        public void addTrinhKy_OnButtonClick()
        {
            if (mv_oRptFieldObj == null)
            {
                Utility.ShowMsg("Hệ thống không phát hiện trình ký trên báo cáo này. Mời bạn kiểm tra lại");
                return;
            }

            try
            {
                //Hien form de thay doi tuy chon ky
                frm_SignInfor sv_fTuyChonKy = new frm_SignInfor();

                sv_fTuyChonKy.txtBaoCao.Text = Utility.DoTrim(this.mv_oNguoiKy.mv_TEN_BIEUBC) == "" ? mv_sReportFileName : Utility.DoTrim(this.mv_oNguoiKy.mv_TEN_BIEUBC);
                //sv_fTuyChonKy.txtCoChu.Text = Me.mv_oNguoiKy.mv_CO_CHU.ToString()

                //sv_fTuyChonKy.txtKieuFont.Text = Me.mv_oNguoiKy.mv_KIEU_CHU
                //#$X$# cua XuanDT, khong duoc doi
                sv_fTuyChonKy.txtTrinhky.Rtf = this.mv_oNguoiKy.mv_NOI_DUNG;

                //sv_fTuyChonKy.txtTenFont.Text = Me.mv_oNguoiKy.mv_FONT_CHU
                sv_fTuyChonKy.mv_sFontName = this.mv_oNguoiKy.mv_FONT_CHU;
                sv_fTuyChonKy.mv_sFontSize = this.mv_oNguoiKy.mv_CO_CHU.ToString();
                sv_fTuyChonKy.mv_sFontStyle = this.mv_oNguoiKy.mv_KIEU_CHU;
                //sv_fTuyChonKy.mv_sSoLuongCanIn=this.mv_oNguoiKy.mv
                sv_fTuyChonKy.ShowDialog();
                if (sv_fTuyChonKy.mv_bChapNhan)
                {
                    this.mv_oNguoiKy.mv_TEN_BIEUBC = sv_fTuyChonKy.txtBaoCao.Text.Trim();
                    if (!mv_bAdded)
                    {
                        this.mv_oNguoiKy.mv_NOI_DUNG = sv_fTuyChonKy.txtTrinhky.Rtf;
                    }
                    else
                    {
                        this.mv_oNguoiKy.mv_NOI_DUNG = sv_fTuyChonKy.txtTrinhky.Rtf;
                    }
                    if (sv_fTuyChonKy.chkGhiLai.Checked == true)
                    {
                        this.mv_oNguoiKy.updateRPTtoDB();
                    }
                    SetParamAgain();

                    this.crptViewer.ReportSource = RptDoc;
                }
            }
            catch (Exception ex)
            {
                Utility.ShowMsg("Lỗi:"+ ex.Message);
            }
        }
Esempio n. 4
0
        public void addTrinhKy_OnButtonClick()
        {
            if (mv_oRptFieldObj == null) return;

            try
            {
                //Hien form de thay doi tuy chon ky
                frm_SignInfor sv_fTuyChonKy = new frm_SignInfor();
                sv_fTuyChonKy.txtBaoCao.Text = this.mv_oNguoiKy.mv_TEN_BIEUBC;
                //sv_fTuyChonKy.txtCoChu.Text = Me.mv_oNguoiKy.mv_CO_CHU.ToString()

                //sv_fTuyChonKy.txtKieuFont.Text = Me.mv_oNguoiKy.mv_KIEU_CHU
                //#$X$# cua XuanDT, khong duoc doi
                sv_fTuyChonKy.txtTrinhky.Rtf = this.mv_oNguoiKy.mv_NOI_DUNG;
                //sv_fTuyChonKy.txtTenFont.Text = Me.mv_oNguoiKy.mv_FONT_CHU
                sv_fTuyChonKy.mv_sFontName = this.mv_oNguoiKy.mv_FONT_CHU;
                sv_fTuyChonKy.mv_sFontSize = this.mv_oNguoiKy.mv_CO_CHU.ToString();
                sv_fTuyChonKy.mv_sFontStyle = this.mv_oNguoiKy.mv_KIEU_CHU;
                //sv_fTuyChonKy.mv_sSoLuongCanIn=this.mv_oNguoiKy.mv
                sv_fTuyChonKy.ShowDialog();
                if (sv_fTuyChonKy.mv_bChapNhan)
                {
                    this.mv_oNguoiKy.mv_TEN_BIEUBC = sv_fTuyChonKy.txtBaoCao.Text.Trim();
                    if (!mv_bAdded)
                    {
                        this.mv_oNguoiKy.mv_NOI_DUNG = sv_fTuyChonKy.txtTrinhky.Rtf;
                    }
                    else
                    {
                        this.mv_oNguoiKy.mv_NOI_DUNG = sv_fTuyChonKy.txtTrinhky.Rtf;
                    }
                    if (sv_fTuyChonKy.chkGhiLai.Checked == true)
                    {
                        this.mv_oNguoiKy.updateRPTtoDB();
                    }
                    SetParamAgain(RptDoc.ParameterFields);
                    //if (mv_bSetContent)
                    //{
                    //    mv_oRptDoc.DataDefinition.FormulaFields["Formula_1"].Text =  mv_oNguoiKy.mv_NOI_DUNG.Replace("&NHANVIEN", globalVariables.gv_strTenNhanvien);
                    //}
                    //else
                    //{
                    //    mv_oRptDoc.DataDefinition.FormulaFields["Formula_1"].Text = "";
                    //}
                    //mv_oViewDoc.ReportSource = Nothing
                    mv_oViewDoc.ReportSource = RptDoc;
                }
            }
            catch (Exception ex)
            {

            }
        }