private void RecordTSB_Click(object sender, EventArgs e) { DataSet data = new eximdocCRUD().getData(); DtGrid.DataSource = data; DtGrid.DataMember = "tbleximdoc"; }
private void Print_Click(object sender, EventArgs e) { if (checkBeaCukai1.Checked) { DataSet data = new eximdocCRUD().prBeaCukai1(dateFrom.Value, dateTo.Value); Application.DoEvents(); data.WriteXml("C:\\MyGarmentReport\\BeaCukai1.xml", XmlWriteMode.WriteSchema); PrintBeaCukai1 f = new PrintBeaCukai1(); f.Show(); } if (checkBeaCukai2.Checked) { DataSet data = new eximdocCRUD().prBeaCukai2(dateFrom.Value, dateTo.Value); Application.DoEvents(); data.WriteXml("C:\\MyGarmentReport\\BeaCukai2.xml", XmlWriteMode.WriteSchema); PrintBeaCukai2 f = new PrintBeaCukai2(); f.Show(); } if (checkBeaCukai3.Checked) { DataSet data = new eximdocCRUD().prBeaCukai3(dateFrom.Value, dateTo.Value); Application.DoEvents(); data.WriteXml("C:\\MyGarmentReport\\BeaCukai3.xml", XmlWriteMode.WriteSchema); PrintBeaCukai3 f = new PrintBeaCukai3(); f.Show(); } if (checkBeaCukai4.Checked) { DataSet data = new eximdocCRUD().prBeaCukai4(dateFrom.Value, dateTo.Value); Application.DoEvents(); data.WriteXml("C:\\MyGarmentReport\\BeaCukai4.xml", XmlWriteMode.WriteSchema); PrintBeaCukai4 f = new PrintBeaCukai4(); f.Show(); } if (checkBeaCukai5.Checked) { DataSet data = new eximdocCRUD().prBeaCukai5(dateFrom.Value, dateTo.Value); Application.DoEvents(); data.WriteXml("C:\\MyGarmentReport\\BeaCukai5.xml", XmlWriteMode.WriteSchema); PrintBeaCukai5 f = new PrintBeaCukai5(); f.Show(); } if (checkBeaCukai6.Checked) { DataSet data = new eximdocCRUD().prBeaCukai6(dateFrom.Value, dateTo.Value); Application.DoEvents(); data.WriteXml("C:\\MyGarmentReport\\BeaCukai6.xml", XmlWriteMode.WriteSchema); PrintBeaCukai6 f = new PrintBeaCukai6(); f.Show(); } if (checkBeaCukai7.Checked) { DataSet data = new eximdocCRUD().prBeaCukai7(dateFrom.Value, dateTo.Value); Application.DoEvents(); data.WriteXml("C:\\MyGarmentReport\\BeaCukai7.xml", XmlWriteMode.WriteSchema); PrintBeaCukai7 f = new PrintBeaCukai7(); f.Show(); } }
// serah private void load_data(string DataNo) { DataSet dsHeader = new eximdocCRUD().findData(DataNo); txtNoAju.Text = DataNo; AjuDate.Value = (DateTime)dsHeader.Tables[0].Rows[0]["AJUDATE"]; txtBLNO.Text = Convert.ToString(dsHeader.Tables[0].Rows[0]["BLNO"]); txtDocNo.Text = Convert.ToString(dsHeader.Tables[0].Rows[0]["DOCNO"]); txtInvoice.Text = Convert.ToString(dsHeader.Tables[0].Rows[0]["INVNO"]); txtRemarks.Text = Convert.ToString(dsHeader.Tables[0].Rows[0]["REMARKS"]); txtTransNo.Text = Convert.ToString(dsHeader.Tables[0].Rows[0]["TRANSNO"]); BLDate.Value = (DateTime)dsHeader.Tables[0].Rows[0]["BLDATE"]; dateCreated.Value = (DateTime)dsHeader.Tables[0].Rows[0]["DATE"]; InvoiceDate.Value = (DateTime)dsHeader.Tables[0].Rows[0]["INVDATE"]; DocDate.Value = (DateTime)dsHeader.Tables[0].Rows[0]["DOCDATE"]; cbAlasan.Text = Convert.ToString(dsHeader.Tables[0].Rows[0]["DOCREASON"]); cbJenis.Text = Convert.ToString(dsHeader.Tables[0].Rows[0]["DOCTYPE"]); cbTypeID.Text = Convert.ToString(dsHeader.Tables[0].Rows[0]["TYPE"]); //detail DataSet dsDetail = new eximdocdetailCRUD().findData(DataNo); dtGrid.Rows.Clear(); for (int i = 0; i < dsDetail.Tables[0].Rows.Count; i++) { dtGrid.Rows.Add(); dtGrid.Rows[i].HeaderCell.Value = "V"; dtGrid.Rows[i].Cells["hTransNo1"].Value = Convert.ToString(dsDetail.Tables[0].Rows[i]["TRANSNO"]); dtGrid.Rows[i].Cells["hID1"].Value = Convert.ToInt32(dsDetail.Tables[0].Rows[i]["ID"]); dtGrid.Rows[i].Cells["hTransNo"].Value = Convert.ToString(dsDetail.Tables[0].Rows[i]["TRANSNO"]); dtGrid.Rows[i].Cells["hID"].Value = Convert.ToInt32(dsDetail.Tables[0].Rows[i]["ID"]); dtGrid.Rows[i].Cells["hItemsID"].Value = Convert.ToString(dsDetail.Tables[0].Rows[i]["ITEMSID"]); dtGrid.Rows[i].Cells["hStyleID"].Value = Convert.ToString(dsDetail.Tables[0].Rows[i]["STYLEID"]); dtGrid.Rows[i].Cells["hDescription"].Value = Convert.ToString(dsDetail.Tables[0].Rows[i]["DESCRIPTION"]); dtGrid.Rows[i].Cells["hQuantity"].Value = Convert.ToDecimal(dsDetail.Tables[0].Rows[i]["QUANTITY"]); dtGrid.Rows[i].Cells["hUOM"].Value = Convert.ToString(dsDetail.Tables[0].Rows[i]["UOM"]); dtGrid.Rows[i].Cells["hCurrency"].Value = Convert.ToString(dsDetail.Tables[0].Rows[i]["CURRENCY"]); dtGrid.Rows[i].Cells["hPrice"].Value = Convert.ToDecimal(dsDetail.Tables[0].Rows[i]["PRICE"]); dtGrid.Rows[i].Cells["hTotal"].Value = Convert.ToDecimal(dsDetail.Tables[0].Rows[i]["TOTAL"]); dtGrid.Rows[i].Cells["hKurs"].Value = Convert.ToDecimal(dsDetail.Tables[0].Rows[i]["KURS"]); } }