• Webservise如何Webservise实现打印


    protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["FormID"] == "")
            {
                return;
            }
            else
            {
                DataTable TransitionForm = Transition_TransitionReport.GetTransitionForm(Request.QueryString["FormID"]);
                CrystalReportSource1.ReportDocument.SetDataSource(Transition_TransitionReport.GetTransitionForm(Request.QueryString["FormID"]));
                //CrystalReportSource1.ReportDocument.SetDataSource(Transition_TransitionReport.GetEmpTransitionForm(Request.QueryString["FormID"]));
                string aa = TransitionForm.Rows[0]["TransitionID"].ToString();
                CrystalReportSource1.ReportDocument.ParameterFields["FormID"].CurrentValues.AddValue(TransitionForm.Rows[0]["TransitionID"].ToString());
                CrystalReportSource1.ReportDocument.ParameterFields["InputName"].CurrentValues.AddValue(TransitionForm.Rows[0]["InputName"].ToString());
                CrystalReportSource1.ReportDocument.ParameterFields["InputDate"].CurrentValues.AddValue(TransitionForm.Rows[0]["InputDate"].ToString());

                          CrystalReportSource1.DataBind();
                CrystalReportViewer1.DataBind();
            }        
        } 
        public static DataTable GetTransitionForm(string TransitionID)
        {
            Transition.HRTransitionService.HRTransitionService TransitionForm = new Transition.HRTransitionService.HRTransitionService();
            Transition.EmpTransitionService.EmpTransitionService EmpTransitionForm = new Transition.EmpTransitionService.EmpTransitionService();
            DataSet Form = TransitionForm.GetTransitionByID(TransitionID);
            DataTable Table = new DataTable("TransitionForm");
            int a = Form.Tables[0].Rows.Count;
            return Form.Tables[0];
             }

        public static DataTable GetEmpTransitionForm(string TransitionID)
        {
            Transition.HRTransitionService.HRTransitionService TransitionForm = new Transition.HRTransitionService.HRTransitionService();
            Transition.EmpTransitionService.EmpTransitionService EmpTransitionForm = new Transition.EmpTransitionService.EmpTransitionService();
            DataSet Form = EmpTransitionForm.GetEmpTransitionByID(TransitionID);
            DataTable Table = new DataTable("EmpTransitionForm");
            Table.Columns.Add("TransitionID", typeof(string));
            Table.Columns.Add("EmpID", typeof(string));
                   Table.Columns.Add("TransTypeID", typeof(string));
            Table.Columns.Add("Reason", typeof(string));
            Table.Columns.Add("Remark", typeof(string));
            //int a = Form.Tables[0].Rows.Count;
            //return Form.Tables[0];

            foreach (DataRow Row in Form.Tables[0].Rows)
            {
                DataRow NewRow = Table.NewRow();
                DataSet Set = EmpTransitionForm.GetEmpTransitionByID(Row["TransitionID"].ToString());
                NewRow["TransitionID"] = Row["TransitionID"];
                NewRow["EmpID"] = Row["EmpID"];
                            NewRow["TransTypeID"] = Row["TransTypeID"];
                NewRow["Reason"] = Row["Reason"];
                NewRow["Remark"] = Row["Remark"];
                Table.Rows.Add(NewRow);
            }
            return Table;
        }

     protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["FormID"] == "")
            {
                return;
            }
            else
            {
                DataSet  TransitionFormSet = TransitionForm.GetTransitionByID (Request.QueryString["FormID"]);
                DataSet EmpForms = EmpForm.GetEmpTransitionByID(Request.QueryString["FormID"]);
                this.CrystalReportSource1.ReportDocument.SetDataSource(TransitionFormSet);
                this.CrystalReportSource1.ReportDocument.Subreports["emptransition"].SetDataSource(EmpForms);
                this.CrystalReportSource1.DataBind();          
            }  
        }


    select case {EmpPublic.Sex}
    case true
    formula = "男"
    case false
    formula = "女"
    End select



  • 相关阅读:
    关于token的理解
    JavaScript 中 call()、apply()、bind() 的用法
    常用JS整理
    js里面for循环的++i与i++
    前端命名规范
    H5混合开发app常用代码
    jquery知识巩固
    水平垂直居中(固定宽不固定宽)
    css3新属性运用
    bug笔记(pc)
  • 原文地址:https://www.cnblogs.com/Tms/p/798907.html
Copyright © 2020-2023  润新知