using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
//using System.Data;
using System.Data.SqlClient;
namespace ElSoft_FactuStocks
{
public partial class Facturacao : Form
{
public Facturacao()
{
InitializeComponent();
}
//DataRowView drv;
System.Data.SqlServerCe.SqlCeConnection con;
System.Data.SqlServerCe.SqlCeDataAdapter da;
System.Data.SqlServerCe.SqlCeCommandBuilder cb;
DataSet ds1;
int MaxRows = 0;
int inc = 0;
private void btnSave_Facturacao_Click(object sender, EventArgs e)
{
DataRow dRow = ds1.Tables["facturacao"].NewRow();
dRow[1] = label10.Text;
/*dRow[1] = nomeClienteFactu.Text;
dRow[2] = artigoFactu.Text;
dRow[3] = leituraCodFactu.Text;
dRow[4] = quantidadeFactu.Text;
dRow[5] = precoFactu.Text;
dRow[6] = totalFactu.Text;*/
//dRow[7] = quantidadeFactu.Text;
//dRow[8] = quantidadeFactu.Text;
ds1.Tables["Facturacao"].Rows.Add(dRow);
System.Data.SqlServerCe.SqlCeCommandBuilder cb;
cb = new System.Data.SqlServerCe.SqlCeCommandBuilder(da);
cb.DataAdapter.Update(ds1.Tables["Facturacao"]);
MaxRows = MaxRows + 1;
inc = MaxRows - 1;
//btnAddNew.Enabled = true;
//btnSave.Enabled = false;
}