private void RecordTSB_Click(object sender, EventArgs e) { DataSet data = new mcustvendCRUD().getData(); DtGrid.DataSource = data; DtGrid.DataMember = "tblmcustvend"; }
private void Binding() { DataSet data = new mcustvendCRUD().getData(); //data.geData(); DtGrid.DataSource = data; DtGrid.DataMember = "tblmcustvend"; }
private void RecordTSB_Click(object sender, EventArgs e) { DataSet data = new mcustvendCRUD().getData(txtCustVendCode.Text, txtName.Text, txtType.Text); //data.geData(); DtGrid.DataSource = data; DtGrid.DataMember = "tblmcustvend"; }
private void txtCustomerID_TextChanged(object sender, EventArgs e) { DataSet dsSupplier = new mcustvendCRUD().getData(txtCustomerID.Text, "", ""); if (dsSupplier.Tables[0].Rows.Count > 0) { txtCustomerDesc.Text = dsSupplier.Tables[0].Rows[0]["NAME"].ToString(); } }
private void txtDeliveryTo_TextChanged(object sender, EventArgs e) { DataSet dsSupplier = new mcustvendCRUD().getData(txtDeliveryTo.Text, "", ""); if (dsSupplier.Tables[0].Rows.Count > 0) { txtDeliveryToDesc.Text = dsSupplier.Tables[0].Rows[0]["NAME"].ToString(); txtAddresTo.Text = dsSupplier.Tables[0].Rows[0]["ADDRESS"].ToString(); } }
private void cmdPONO_Click(object sender, EventArgs e) { frmPurchaseSearch f = new frmPurchaseSearch(); f.AddItemCallback = new frmPurchaseSearch.AddPurchaseDelegate(this.SetPurchaseCallBack); f.ShowDialog(); //txtCostingNo.Text if (GStrCode != "") { DataSet dsHeader = new purchaseCRUD().getData(GStrCode); txtPONO.Text = GStrCode; cbDIV.SelectedValue = dsHeader.Tables[0].Rows[0]["GDIV"]; dateCreated.Value = (DateTime)dsHeader.Tables[0].Rows[0]["DATE"]; txtRemarks.Text = dsHeader.Tables[0].Rows[0]["REMARKS"].ToString(); txtCustomerID.Text = dsHeader.Tables[0].Rows[0]["CUSTVENDID"].ToString(); DataSet dsSupplier = new mcustvendCRUD().getData(txtCustomerID.Text, "", ""); if (dsSupplier.Tables[0].Rows.Count > 0) { txtCustomerDesc.Text = dsSupplier.Tables[0].Rows[0]["NAME"].ToString(); txtAddress.Text = dsSupplier.Tables[0].Rows[0]["ADDRESS"].ToString(); } txtAddress.Text = dsHeader.Tables[0].Rows[0]["DELIVERYTOADDRESS"].ToString(); //txtRefer.Text = dsHeader.Tables[0].Rows[0]["REFERTO"].ToString(); cbStore.Text = dsHeader.Tables[0].Rows[0]["COURIER"].ToString(); DataSet dsDetail = new purchasedetailCRUD().getDataGrn(GStrCode); cbJENIS.Text = "RAW"; dtGrid.Rows.Clear(); for (int i = 0; i < dsDetail.Tables[0].Rows.Count; i++) { dtGrid.Rows.Add(); dtGrid.Rows[i].HeaderCell.Value = "#"; dtGrid.Rows[i].Cells["hStyleID"].Value = dsDetail.Tables[0].Rows[i]["STYLEID"].ToString(); GStrCode = dsDetail.Tables[0].Rows[i]["COSTINGNO"].ToString(); dtGrid.Rows[i].Cells["hItemsID"].Value = dsDetail.Tables[0].Rows[i]["ITEMSID"]; dtGrid.Rows[i].Cells["hPONO"].Value = dsDetail.Tables[0].Rows[i]["PONO"].ToString(); dtGrid.Rows[i].Cells["hID"].Value = dsDetail.Tables[0].Rows[i]["ID"].ToString(); dtGrid.Rows[i].Cells["hQuantity"].Value = dsDetail.Tables[0].Rows[i]["QUANTITY"].ToString(); dtGrid.Rows[i].Cells["hUOM"].Value = dsDetail.Tables[0].Rows[i]["UOM"].ToString(); //dtGrid.Rows[i].Cells["hPrice"].Value = dsDetail.Tables[0].Rows[i]["PRICE"].ToString(); dtGrid.Rows[i].Cells["hDescription"].Value = dsDetail.Tables[0].Rows[i]["DESCRIPTION"].ToString(); dtGrid.Rows[i].Cells["hQtyPurchase"].Value = dsDetail.Tables[0].Rows[i]["QTYPURCHASE"].ToString(); dtGrid.Rows[i].Cells["hUOMPurchase"].Value = dsDetail.Tables[0].Rows[i]["UOMPURCHASE"].ToString(); //dtGrid.Rows[i].Cells["hPricePurchase"].Value = dsDetail.Tables[0].Rows[i]["PRICEPURCHASE"].ToString(); dtGrid.Rows[i].Cells["hConvert"].Value = dsDetail.Tables[0].Rows[i]["CONVER"]; //dtGrid.Rows[i].Cells["hCurrencyID"].Value = dsDetail.Tables[0].Rows[i]["CURRENCYID"].ToString(); //dtGrid.Rows[i].Cells["hKurs"].Value = dsDetail.Tables[0].Rows[i]["KURS"].ToString(); dtGrid.Rows[i].Cells["hStyleID"].Value = dsDetail.Tables[0].Rows[i]["STYLEID"].ToString(); } SimpanTSB.Enabled = true; UbahTSB.Enabled = false; dtGrid.Enabled = true; } }
private void cmdCustomer_Click(object sender, EventArgs e) { frmCustomerSearch f = new frmCustomerSearch(); f.AddItemCallback = new frmCustomerSearch.AddCustomerDelegate(this.SetCustomerCallBack); f.ShowDialog(); if (GStrCode != "") { DataSet dsSupplier = new mcustvendCRUD().getData(GStrCode, "", ""); for (int i = 0; i < dsSupplier.Tables[0].Rows.Count; i++) { txtCustomerDesc.Text = Convert.ToString(dsSupplier.Tables[0].Rows[i]["NAME"]); txtAddress.Text = Convert.ToString(dsSupplier.Tables[0].Rows[i]["ADDRESS"]); } } }
private void button1_Click(object sender, EventArgs e) { frmjoborderSearch f = new frmjoborderSearch(); f.AddItemCallback = new frmjoborderSearch.AddCostingDelegate(this.SetCostingCallBack); f.ShowDialog(); if (GStrCode != "") { DataSet dsHeader = new joborderCRUD().getGarment(GStrCode); cbDIV.SelectedValue = dsHeader.Tables[0].Rows[0]["GDIV"].ToString(); txtCustomerID.Text = dsHeader.Tables[0].Rows[0]["CUSTVENDCODE"].ToString(); DataSet dsSupplier = new mcustvendCRUD().getData(txtCustomerID.Text, "", ""); if (dsSupplier.Tables[0].Rows.Count > 0) { txtCustomerDesc.Text = dsSupplier.Tables[0].Rows[0]["NAME"].ToString(); txtAddress.Text = dsSupplier.Tables[0].Rows[0]["ADDRESS"].ToString(); } //isi detail DataSet dsDetail = new joborderdetailCRUD().getData(GStrCode); // var index = dtGrid.Rows.Add(); dtGrid.Rows.Clear(); for (int i = 0; i < dsDetail.Tables[0].Rows.Count; i++) { dtGrid.Rows.Add(); dtGrid.Rows[i].HeaderCell.Value = "#"; dtGrid.Rows[i].Cells["hID"].Value = i;//dsDetail.Tables[0].Rows[i]["ID"].ToString(); dtGrid.Rows[i].Cells["hItemsID"].Value = Convert.ToString(dsHeader.Tables[0].Rows[0]["ITEMSID"]); dtGrid.Rows[i].Cells["hDescription"].Value = Convert.ToString(dsHeader.Tables[0].Rows[0]["ITEMSID"]); // dtGrid.Rows[i].Cells["hJenis"].Value = dsDetail.Tables[0].Rows[i]["JENIS"].ToString(); dtGrid.Rows[i].Cells["hColorID"].Value = Convert.ToString(dsDetail.Tables[0].Rows[i]["COLORID"]); dtGrid.Rows[i].Cells["hSizeID"].Value = Convert.ToString(dsDetail.Tables[0].Rows[i]["SIZEID"]); dtGrid.Rows[i].Cells["hGrade"].Value = "A"; dtGrid.Rows[i].Cells["hStyleID"].Value = Convert.ToString(dsHeader.Tables[0].Rows[0]["ITEMSID"]); dtGrid.Rows[i].Cells["hQuantity"].Value = Convert.ToString(dsDetail.Tables[0].Rows[i]["QUANTITY"]); dtGrid.Rows[i].Cells["hUOM"].Value = "PCS"; dtGrid.Rows[i].Cells["hConvert"].Value = 1; dtGrid.Rows[i].Cells["hQtyPurchase"].Value = Convert.ToString(dsDetail.Tables[0].Rows[i]["QUANTITY"]); dtGrid.Rows[i].Cells["hUOMPurchase"].Value = "PCS"; } SimpanTSB.Enabled = true; UbahTSB.Enabled = false; dtGrid.Enabled = true; } }