public Sospesi(connectoToMySql mCon, string idpren) { this.idpren = idpren; mConnection = mCon; InitializeComponent(); load(); }
public Progressivo(connectoToMySql mConnection) { // TODO: Complete member initialization this.mConnection = mConnection; InitializeComponent(); if (mConnection != null) { if (mConnection.cnMySQL.State != ConnectionState.Closed) { mConnection.cnMySQL.Close(); } if (mConnection.cnMySQL.State != ConnectionState.Open) { mConnection.cnMySQL.Open(); } mConnection.cmdMySQL = new MySqlCommand("select * from progressivi", mConnection.cnMySQL); mConnection.reader = mConnection.cmdMySQL.ExecuteReader(); while (mConnection.reader.Read()) { numericUpDown1.Value = Convert.ToInt16(mConnection.reader.GetValue(1).ToString()); numericUpDown2.Value = Convert.ToInt16(mConnection.reader.GetValue(0).ToString()); numericUpDown3.Value = Convert.ToInt16(mConnection.reader.GetValue(2).ToString()); tds.Value = Convert.ToInt16(mConnection.reader.GetValue(4).ToString()); } mConnection.cnMySQL.Close(); } }
public Turni(connectoToMySql mcon) { mConnection = mcon; InitializeComponent(); rnd = new Random(); dateTimePicker1.Value = DateTime.Now; dateTimePicker2.Value = DateTime.Now.AddDays(1); }
public ModificaCliente(connectoToMySql mcon) { mConnection = mcon; InitializeComponent(); button2.Hide(); button2.Enabled = false; this.Show(); this.Focus(); // button2.Show(); }
public ModificaCliente(connectoToMySql mcon, int id, string nom, string cog) { mConnection = mcon; button1.Hide(); button1.Enabled = false; //button2.Show(); //button2.Location = button1.Location; cNome.Text = nom; cCognome.Text = cog; this.id = id; // this.arrivo.Value = DateTime.Now; }
public ModificaCliente(connectoToMySql mConnection, int p, string p_2, string p_3, string p_4, string p_5, string p_6) { // TODO: Complete member initialization this.mConnection = mConnection; this.id = p; InitializeComponent(); button1.Hide(); cNome.Text = p_2; cCognome.Text = p_3; ragsociale.Text = p_4; codicefiscale.Text = p_5; telefoni.Text = p_6; }
public FatturaoRicevuta(connectoToMySql mCon, string p, bool prp)//,string nomecliente, int numerocamere, string arrivo, string partenza, float tariffa, bool forfait, float anticipo, int iva) { // TODO: Complete member initialization mConnection = mCon; prepaid = prp; Prenotazione = p; InitializeComponent(); //cliente = nomecliente; //this.anticipo = anticipo; //this.forfait = forfait; //this.tariffa = tariffa; //DateTime ar = new DateTime(DateTime.Parse(arrivo).Year, DateTime.Parse(arrivo).Month, DateTime.Parse(arrivo).Day); //datear = ar.ToShortDateString(); //DateTime par = new DateTime(DateTime.Parse(partenza).Year, DateTime.Parse(partenza).Month, DateTime.Parse(partenza).Day); //TimeSpan t = par - ar; //datepar = par.ToShortDateString(); //days = t.Days; //this.numerocamere = numerocamere; //this.iva = iva; }
public Conto(connectoToMySql mCon, string idCliente, string p, int numerocamere, string arrivo, string partenza, float tariffa, bool forfait, float anticipo, int iva, string camera) { currentcamera = camera; mConnection = mCon; cliente = idCliente; Prenotazione = p; InitializeComponent(); this.anticipo = anticipo; this.forfait = forfait; this.tariffa = tariffa; DateTime ar = new DateTime(DateTime.Parse(arrivo).Year, DateTime.Parse(arrivo).Month, DateTime.Parse(arrivo).Day); datear = ar.ToShortDateString(); DateTime par = new DateTime(DateTime.Parse(partenza).Year, DateTime.Parse(partenza).Month, DateTime.Parse(partenza).Day); TimeSpan t = par - ar; days = t.Days; this.numerocamere = numerocamere; this.iva = iva; refreshlist(); dateTimePicker1.Value = DateTime.Now; }
public TipoCamera(connectoToMySql mcon, List <string> cam) { mConnection = mcon; camere = cam; InitializeComponent(); if (camere.Count == 1) { if (mConnection.cnMySQL.State == ConnectionState.Closed) { MySqlCommand cmd = new MySqlCommand( "SELECT * FROM camere where Name='" + camere[0] + "';", mConnection.cnMySQL); if (mConnection.cnMySQL.State != ConnectionState.Closed) { mConnection.cnMySQL.Close(); } if (mConnection.cnMySQL.State != ConnectionState.Open) { mConnection.cnMySQL.Open(); } MySqlDataReader dataReader = cmd.ExecuteReader(); // print the CustomerID of each record // bool update = false; while (dataReader.Read()) { textBox1.Text = dataReader.GetString(2); checkBox1.Checked = dataReader.GetBoolean(3); checkBox2.Checked = dataReader.GetBoolean(4); } if (mConnection.cnMySQL.State != ConnectionState.Closed) { mConnection.cnMySQL.Close(); } } } }
public Acconti(connectoToMySql mCon, string p, string nomecliente, int numerocamere, string arrivo, string partenza, float tariffa, bool forfait, float anticipo, int iva) { // TODO: Complete member initialization mConnection = mCon; Prenotazione = p; InitializeComponent(); cliente = nomecliente; this.anticipo = anticipo; this.forfait = forfait; this.tariffa = tariffa; DateTime ar = new DateTime(DateTime.Parse(arrivo).Year, DateTime.Parse(arrivo).Month, DateTime.Parse(arrivo).Day); datear = ar.ToShortDateString(); DateTime par = new DateTime(DateTime.Parse(partenza).Year, DateTime.Parse(partenza).Month, DateTime.Parse(partenza).Day); TimeSpan t = par - ar; datepar = par.ToShortDateString(); days = t.Days; this.numerocamere = numerocamere; this.iva = iva; comboBox1.SelectedIndex = 0; refreshlist(); }
public notcred(connectoToMySql mcon, int idcliente) { mConnection = mcon; this.idcliente = idcliente; InitializeComponent(); }
public Operatori(connectoToMySql mCon) { mConnection = mCon; InitializeComponent(); }
public Turni(connectoToMySql mcon) { mConnection = mcon; InitializeComponent(); rnd = new Random(); }
public editroom(connectoToMySql mCon) { mConnection = mCon; InitializeComponent(); }
public Tipostanze(connectoToMySql mCon) { mConnection = mCon; InitializeComponent(); readroom(); }
public Fonti(connectoToMySql mCon) { mConnection = mCon; InitializeComponent(); }
public Arrangiamento(connectoToMySql mCon) { mConnection = mCon; InitializeComponent(); }
public Tipologiaeconomica(connectoToMySql mCon) { mConnection = mCon; InitializeComponent(); }
public Telefonate(connectoToMySql mcon) { mConnection = mcon; InitializeComponent(); }
public Tariffe(connectoToMySql mCon) { mConnection = mCon; InitializeComponent(); refreshlist(); }
public Storico(connectoToMySql mconn) { mConnection = mconn; InitializeComponent(); dateTimePicker1.Value = DateTime.Now; string datas = dateTimePicker1.Value.Month.ToString() + "/" + dateTimePicker1.Value.Year.ToString(); string datas2 = datas; if (checkBox1.Checked) { datas = dateTimePicker1.Value.ToShortDateString(); } if (mConnection != null) { if (mConnection.cnMySQL.State != ConnectionState.Closed) { mConnection.cnMySQL.Close(); } if (mConnection.cnMySQL.State != ConnectionState.Open) { mConnection.cnMySQL.Open(); } // mConnection.cmdMySQL = new MySqlCommand("select * from prenotazioni where substring(arrivo ,4," + datas2.Length + ")= '" + datas2 + "'", mConnection.cnMySQL); mConnection.cmdMySQL = new MySqlCommand("select * from prenotazioni where LOCATE('" + datas + "',arrivo)", mConnection.cnMySQL); // mConnection.cmdMySQL = new MySqlCommand("select Incasso from incassi where Mese='" + datas + "'", mConnection.cnMySQL); // get query results mConnection.reader = mConnection.cmdMySQL.ExecuteReader(); int countCamere = 0; float incassitotale = 0; // print the CustomerID of each record while (mConnection.reader.Read()) { countCamere++; if (mConnection.reader.GetInt32(6) == 1) { float incassosingolo = Convert.ToSingle(mConnection.reader.GetString(5)); incassitotale += incassosingolo; } else { DateTime arr = DateTime.Parse(mConnection.reader.GetString(3).Substring(0, 10)); DateTime par = DateTime.Parse(mConnection.reader.GetString(4).Substring(0, 10)); TimeSpan difference = par - arr; float incassosingolo = Convert.ToSingle(mConnection.reader.GetString(5)); incassitotale += (incassosingolo * difference.Days); } } label3.Text = "Camere Vendute: " + countCamere.ToString(); label1.Text = "Incasso totale:" + incassitotale + "€"; if (mConnection.cnMySQL.State != ConnectionState.Closed) { mConnection.cnMySQL.Close(); } if (mConnection.cnMySQL.State != ConnectionState.Open) { mConnection.cnMySQL.Open(); } mConnection.cmdMySQL = new MySqlCommand("select Incasso from incassi where Mese='" + datas + "'", mConnection.cnMySQL); // get query results mConnection.reader = mConnection.cmdMySQL.ExecuteReader(); // print the CustomerID of each record while (mConnection.reader.Read()) { string thisrow = ""; thisrow = mConnection.reader.GetValue(0).ToString(); if (thisrow != "") { // label1.Text = "Incasso totale:" + thisrow + "€"; } } if (mConnection.cnMySQL.State != ConnectionState.Closed) { mConnection.cnMySQL.Close(); } if (mConnection.cnMySQL.State != ConnectionState.Open) { mConnection.cnMySQL.Open(); } mConnection.cmdMySQL = new MySqlCommand("select Incasso from storicotds where Mese='" + datas2 + "'", mConnection.cnMySQL); // get query results mConnection.reader = mConnection.cmdMySQL.ExecuteReader(); // print the CustomerID of each record while (mConnection.reader.Read()) { string thisrow = ""; thisrow = mConnection.reader.GetValue(0).ToString(); if (thisrow != "") { label2.Text = "Totale Mensile Tasse di Soggiorno:" + thisrow + "€"; } } if (mConnection.cnMySQL.State != ConnectionState.Closed) { mConnection.cnMySQL.Close(); } } }