protected void LnkBtnJjdExtHeadInfoDisplay_Click(object sender, EventArgs e) { divJjdHeadInfo.Visible = true; Jjd objJjd_ = new Jjd(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; }
//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 requisition_id req_id,matr_seq_no mtr_no, to_char(matr_seq_line_no)||' ' line_no,");//2013-03-22 ming.li ����������ת��Ϊ�ַ����������кŸ�ʽΪ1.00 sqlstr.Append(" part_no, part_description part_name,project_id proj_id, nvl(project_block,'') proj_block,req_qty qty, part_unit, zh_qty,");//2013-03-22 ming.li �ֶ�Ϊ�գ���ӡ�ո�����ӡ���� sqlstr.Append(string.Format("xh_qty from jp_jjd_line where jjd_no ='{0}'", m_jjd_no)); OleDbConnection conn = new OleDbConnection(DBHelper.OleConnectionString); OleDbCommand cmd = new OleDbCommand(); OleDbDataAdapter da = new OleDbDataAdapter(cmd); //DeliveryVoucher dvchr = (DeliveryVoucher)Session["delivery_voucher"]; Jjd objJjd = new Jjd(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\\CrysJj.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.ReceiptDateStr); 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(); }
//�༭���ӵ�������Ϣ �¼����� �༭״̬ private void JjdHeadExtInfoEdit(Jjd 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; }
//���ӵ�������Ϣ��ֵ private void JjdHeadBaseInfoDataBind(Jjd 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; }
//���ӵ���ʾ������ʾ �������ɼ� private void DisplayJjd(string jjd_no_) { Jjd objJjd_ = new Jjd(jjd_no_); divCreateJjd.Visible = false; divJjdQuery.Visible = false; divJjdDisplay.Visible = true; divJjdHeadInfo.Visible = false; JjdHeadBaseInfoDataBind(objJjd_); GVDisplayJjdLineDataBind(jjd_no_); }
private void JjdHeadBaseInfoDataBind(Jjd 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; hiddenJjdObjid.Value = objJjd_.Objid; hiddenJjdRowversion.Value = objJjd_.RowVersion; hiddenJjdNo.Value = objJjd_.JjdNo; }
private void DisplayJjd(string jjd_no_) { Jjd objJjd_ = new Jjd(jjd_no_); divJjdQuery.Visible = false; divJjdDisplay.Visible = true; JjdHeadBaseInfoDataBind(objJjd_); GVDisplayJjdLineDataBind(jjd_no_); BtnAllFinsh.Enabled = true; if (objJjd_.State != "init") { BtnAllFinsh.Enabled = false; } }