Exemple #1
0
 public void addTrinhKy_OnFormLoad()
 {
     //Ham nay XuanDT them vao
     try {
         //doan gan cac bien: doan nay co the phai thay doi ten bien cho phu hop
         mv_oRptDoc  = RptDoc;
         mv_oViewDoc = this.crptViewer;
         //ket thuc doan gan bien
         mv_oRptFieldObj = mv_oRptDoc.ReportDefinition.ReportObjects["Field150181"] as FieldObject;
         mv_oNguoiKy     = new cls_SignInfor(mv_oRptDoc.ToString(), "");
         //chkPrint_CheckedChanged(chkPrint, New System.EventArgs)
         if (mv_oNguoiKy._TonTai)
         {
             mv_oNguoiKy.setValueToRPT(ref mv_oRptFieldObj);
             if (mv_bSetContent)
             {
                 mv_oRptDoc.DataDefinition.FormulaFields["Formula_1"].Text = Strings.Chr(34) + mv_oNguoiKy.mv_NOI_DUNG.Replace("&NHANVIEN", globalVariables.gv_sStaffName).Replace("#$X$#", Strings.Chr(34) + "&Chr(13)&" + Strings.Chr(34)) + Strings.Chr(34);
             }
             else
             {
                 mv_oRptDoc.DataDefinition.FormulaFields["Formula_1"].Text = "";
             }
             mv_oViewDoc.ReportSource = RptDoc;
         }
         else
         {
             mv_oNguoiKy = new cls_SignInfor(mv_oRptFieldObj, "", RptDoc.ToString(), mv_oRptDoc.DataDefinition.FormulaFields["Formula_1"].Text);
         }
     }
     catch (Exception ex) {
         mv_oRptText = null;
         //an nut tuy chon di
         this.cmdTrinhKy.Visible = false;
     }
 }
Exemple #2
0
	public void addTrinhKy_OnFormLoad()
	{
		//Ham nay XuanDT them vao
		try {
			//doan gan cac bien: doan nay co the phai thay doi ten bien cho phu hop
			mv_oRptDoc = RptDoc;
			mv_oViewDoc = this.crptViewer;
			//ket thuc doan gan bien
			mv_oRptFieldObj = mv_oRptDoc.ReportDefinition.ReportObjects["Field150181"] as FieldObject;
			mv_oNguoiKy = new cls_SignInfor(mv_oRptDoc.ToString(), "");
			//chkPrint_CheckedChanged(chkPrint, New System.EventArgs)
			if (mv_oNguoiKy._TonTai) {
				mv_oNguoiKy.setValueToRPT(ref mv_oRptFieldObj);
				if (mv_bSetContent)
				{
				    mv_oRptDoc.DataDefinition.FormulaFields["Formula_1"].Text = Strings.Chr(34) +
				                                                                mv_oNguoiKy.mv_NOI_DUNG.Replace("&NHANVIEN",
				                                                                                                globalVariables.
				                                                                                                    gv_sStaffName).
				                                                                    Replace("#$X$#",
				                                                                            Strings.Chr(34) + "&Chr(13)&" +
				                                                                            Strings.Chr(34)) + Strings.Chr(34);

				}
				else {
					mv_oRptDoc.DataDefinition.FormulaFields["Formula_1"].Text = "";
				}
				mv_oViewDoc.ReportSource = RptDoc;
			}
			else {
				mv_oNguoiKy = new cls_SignInfor(mv_oRptFieldObj, "", RptDoc.ToString(), mv_oRptDoc.DataDefinition.FormulaFields["Formula_1"].Text);
			}
		}
		catch (Exception ex) {
			mv_oRptText = null;
			//an nut tuy chon di
            log.Error("Loi trong qua trinh load thong tin trih ky={0}",ex);
			this.cmdTrinhKy.Visible = false;
		}
	}