Exemple #1
0
        private void RoomAnalysis_Load(object sender, EventArgs e)
        {
            DataSet ds = new DataSet();

            ds = Reservations.getYear(ds);


            for (int i = 0; i < ds.Tables["Year"].Rows.Count; i++)
            {
                var val = ds.Tables[0].Rows[i][0].ToString().PadLeft(3, '0');

                if (!cmbYear.Items.Contains(val))
                {
                    cmbYear.Items.Add(val);
                }
            }

            DataSet dst = new DataSet();

            cboRoom_Type.Items.Clear();
            ds = RoomRate.getRoomRate(dst);

            for (int i = 0; i < dst.Tables["ss"].Rows.Count; i++)
            {
                cboRoom_Type.Items.Add(dst.Tables[0].Rows[i][0].ToString());
            }
        }
        private void SalesAnalysis_Load(object sender, EventArgs e)
        {
            DataSet ds = new DataSet();

            ds = Reservations.getYear(ds);


            for (int i = 0; i < ds.Tables["Year"].Rows.Count; i++)
            {
                var val = ds.Tables[0].Rows[i][0].ToString().PadLeft(3, '0');

                if (!cmbYear.Items.Contains(val))
                {
                    cmbYear.Items.Add(val);
                }
            }
        }