コード例 #1
0
        //protected Boolean CheckAccessAble()
        //{
        //    if (m_perimission_array[(int)Authentication.FUN_INTERFACE.wzxqjh_jjd_report][0] == '1') return true;
        //    return false;
        //}
        private void PrintPDF()
        {
            ReportDocument rpt_doc = new ReportDocument();
            DataSet ds = new DataSet();
            StringBuilder sqlstr = new StringBuilder();
            //sqlstr.Append("select a.jjd_no,a.requisition_id req_id,a.rowstate,a.remark,a.package_no,a.part_no,b.part_name part_name,");
            //sqlstr.Append("b.part_name_e part_name_e,gen_part_package_api.get_package_name(package_no) package_name,");
            //sqlstr.Append("gen_part_package_item_api.get_unit(package_no,part_no) part_unit,gen_part_package_item_api.get_part_spec(package_no,part_no) part_spec,");
            //sqlstr.Append("zh_qty,xh_qty,finish_time,rowversion,project_id proj_id from jp_pkg_jjd_line a,jp_pkg_requisition b where a.requisition_id=b.requisition_id");
            sqlstr.Append(@"select a.jjd_no,a.requisition_id req_id,a.rowstate,a.remark,a.package_no,a.part_no,
               b.part_name   part_name, b.part_name_e part_name_e,   b.package_name package_name,
               b.part_unit part_unit, b.part_spec part_spec, b.released_qty xq_qty,a.zh_qty,
               a.xh_qty, a.finish_time, a.rowversion,a.project_id proj_id
              from jp_pkg_jjd_line a, jp_pkg_requisition_v b where a.requisition_id = b.requisition_id");
            sqlstr.Append(string.Format(" and a.jjd_no ='{0}' order by a.part_no", m_jjd_no));

            OleDbConnection conn = new OleDbConnection(DBHelper.OleConnectionString);
            OleDbCommand cmd = new OleDbCommand();
            OleDbDataAdapter da = new OleDbDataAdapter(cmd);

            //DeliveryVoucher dvchr = (DeliveryVoucher)Session["delivery_voucher"];

            PkgJjd objJjd = new PkgJjd(m_jjd_no);

            //sqlstr.Append(" and requisition_id in (");
            //for (int i = 0; i < dvchr.DeliveryItems.Count; i++)
            //{
            //    if (i == dvchr.DeliveryItems.Count - 1)
            //    {
            //        sqlstr.Append(string.Format("'{0}'", dvchr.DeliveryItems[i].ToString()));
            //    }
            //    else
            //    {
            //        sqlstr.Append(string.Format("'{0}',", dvchr.DeliveryItems[i].ToString()));
            //    }
            //}
            //sqlstr.Append(" )");

            cmd.Connection = conn;
            cmd.CommandText = sqlstr.ToString();

            da.Fill(ds);

            rpt_doc.Load(Request.PhysicalApplicationPath + "\\UI\\Report\\CrysPkgJjd.rpt");
            rpt_doc.SetDataSource(ds.Tables[0]);
            //dvchr.SetDeliveryVoucherNo();
            rpt_doc.SetParameterValue("jjd_no", m_jjd_no);
            //rpt_doc.SetParameterValue("kuwei", "");
            rpt_doc.SetParameterValue("place", objJjd.PlaceName);
            rpt_doc.SetParameterValue("receiver", objJjd.ReceiptPerson);
            rpt_doc.SetParameterValue("recieve_date", objJjd.ReceiptDate);
            rpt_doc.SetParameterValue("receiver_contact", objJjd.ReceiptContract);
            rpt_doc.SetParameterValue("ZHd", objJjd.ZhPlace);
            rpt_doc.SetParameterValue("ZHr", objJjd.ZhPerson);
            rpt_doc.SetParameterValue("ZHdh", objJjd.ZhContract);
            rpt_doc.SetParameterValue("ZHArrTime", objJjd.ZhArrTime);
            rpt_doc.SetParameterValue("XQbm", objJjd.XQDept);
            rpt_doc.SetParameterValue("XQlxr", objJjd.XQPerson);
            rpt_doc.SetParameterValue("XQdh", objJjd.XQContract);
            rpt_doc.SetParameterValue("CYgs", objJjd.CyCompany);
            rpt_doc.SetParameterValue("CYr", objJjd.CyPerson);
            rpt_doc.SetParameterValue("CYdh", objJjd.CyContract);
            rpt_doc.SetParameterValue("CYpz", objJjd.CycCarNo);
            rpt_doc.SetParameterValue("CYjz", objJjd.CyDoc);

            rpt_doc.PrintOptions.PaperOrientation = PaperOrientation.Landscape;
            rpt_doc.PrintOptions.PaperSize = PaperSize.PaperA4;

            using (MemoryStream fp = (MemoryStream)(rpt_doc.ExportToStream(ExportFormatType.PortableDocFormat)))
            {
                Response.Clear();
                Response.Buffer = true;
                Response.ContentType = "application/pdf";
                Response.BinaryWrite(fp.ToArray());
                fp.Close();
                Response.End();
            }

            rpt_doc.Close();
            rpt_doc.Dispose();
        }
コード例 #2
0
        //�༭���ӵ�������Ϣ �¼����� �༭״̬
        private void JjdHeadExtInfoEdit(PkgJjd objJjd_)
        {
            BtnSaveJjdHeadInfo.Visible = true;
            BtnJjdHeadExtInfoEditQuit.Visible = true;

            ChkSafe.Checked = objJjd_.Safe == "1" ? true : false;

            LblZHd.Visible = false;
            LblZHr.Visible = false;
            LblZHDh.Visible = false;
            LblZHtime.Visible = false;
            LblZHSTime.Visible = false;
            LblZHETime.Visible = false;

            LblXQbm.Visible = false;
            LblXQlxr.Visible = false;
            LblXQdh.Visible = false;

            LblCYgs.Visible = false;
            LblCYPer.Visible = false;
            LblCYdh.Visible = false;
            LblCYph.Visible = false;
            LblCYjz.Visible = false;

            LblXHSTime.Visible = false;
            LblXHETime.Visible = false;

            ChkSafe.Enabled = true;

            TxtZHd.Visible = true;
            TxtZHr.Visible = true;
            TxtZHDh.Visible = true;
            TxtZHTime.Visible = true;
            TxtZHSTime.Visible = true;
            TxtZHETime.Visible = true;

            TxtXQbm.Visible = true;
            TxtXQlxr.Visible = true;
            TxtXQdh.Visible = true;

            TxtCYgs.Visible = true;
            TxtCYPer.Visible = true;
            TxtCYdh.Visible = true;
            TxtCYph.Visible = true;
            TxtCYjz.Visible = true;

            TxtXHSTime.Visible = true;
            TxtXHETime.Visible = true;

            TxtZHd.Text = objJjd_.ZhPlace; ;
            TxtZHr.Text = objJjd_.ZhPerson;
            TxtZHDh.Text = objJjd_.ZhContract;
            TxtZHTime.Text = objJjd_.ZhArrTime;
            TxtZHSTime.Text = objJjd_.ZhStarDate;
            TxtZHETime.Text = objJjd_.ZhEndDate;

            TxtXQbm.Text = objJjd_.XQDept;
            TxtXQlxr.Text = objJjd_.XQPerson;
            TxtXQdh.Text = objJjd_.XQContract;

            TxtCYgs.Text = objJjd_.CyCompany;
            TxtCYPer.Text = objJjd_.CyPerson;
            TxtCYdh.Text = objJjd_.CyContract;
            TxtCYph.Text = objJjd_.CycCarNo;
            TxtCYjz.Text = objJjd_.CyDoc;

            TxtXHSTime.Text = objJjd_.XhStarDate;
            TxtXHETime.Text = objJjd_.XhEndDate;
        }
コード例 #3
0
 //���ӵ�������Ϣ��ֵ
 private void JjdHeadBaseInfoDataBind(PkgJjd objJjd_)
 {
     TxtJjdNo1.Text = objJjd_.JjdNo;
     TxtReceiptDate1.Text = objJjd_.ReceiptDate;
     TxtReceiptPerson1.Text = objJjd_.ReceiptPerson;
     TxtReceiptDept1.Text = objJjd_.ReceiptDept;
     TxtReceiptPlace1.Text = objJjd_.PlaceId;
     TxtState1.Text = objJjd_.StateCh;
 }
コード例 #4
0
        //���ӵ���ʾ������ʾ �������򲻿ɼ�
        private void DisplayJjd(string jjd_no_)
        {
            PkgJjd objJjd_ = new PkgJjd(jjd_no_);

            divCreateJjd.Visible = false;
            divJjdQuery.Visible = false;
            divJjdDisplay.Visible = true;
            divJjdHeadInfo.Visible = false;

            JjdHeadBaseInfoDataBind(objJjd_);
            GVDisplayJjdLineDataBind(jjd_no_);
        }
コード例 #5
0
        private void DisplayJjd(string jjd_no_)
        {
            PkgJjd objJjd_ = new PkgJjd(jjd_no_);

            divJjdQuery.Visible = false;
            divJjdDisplay.Visible = true;

            JjdHeadBaseInfoDataBind(objJjd_);
            GVDisplayJjdLineDataBind(jjd_no_);

            if (objJjd_.State != "init")
            {
                BtnAllFinsh.Enabled = false;
            }
        }
コード例 #6
0
        protected void LnkBtnJjdExtHeadInfoDisplay_Click(object sender, EventArgs e)
        {
            divJjdHeadInfo.Visible = true;

            PkgJjd objJjd_ = new PkgJjd(TxtJjdNo1.Text);

            LblZHd.Text = objJjd_.ZhPlace;
            LblZHr.Text = objJjd_.ZhPerson;
            LblZHDh.Text = objJjd_.ZhContract;
            LblZHtime.Text = objJjd_.ZhArrTime;
            LblZHSTime.Text = objJjd_.ZhStarDate;
            LblZHETime.Text = objJjd_.ZhEndDate;

            LblXQbm.Text = objJjd_.XQDept;
            LblXQlxr.Text = objJjd_.XQPerson;
            LblXQdh.Text = objJjd_.XQContract;

            LblCYgs.Text = objJjd_.CyCompany;
            LblCYPer.Text = objJjd_.CyPerson;
            LblCYdh.Text = objJjd_.CyContract;
            LblCYph.Text = objJjd_.CycCarNo;
            LblCYjz.Text = objJjd_.CyDoc;

            LblXHSTime.Text = objJjd_.XhStarDate;
            LblXHETime.Text = objJjd_.XhEndDate;

            ChkSafe.Checked = objJjd_.Safe == "1" ? true : false;

            ChkSafe.Enabled = false;
        }