Ejemplo n.º 1
0
        private void BindDineINData()
        {
            SqlCommand objCmd = new SqlCommand();

            objCmd.Connection  = con;
            objCmd.CommandText = "select * from DineINOrder INNER JOIN orderDetails ON DineINOrder.orderID = orderDetails.orderID WHERE DineINOrder.restaurantID='" + Session["restaurantID"] + "' ORDER BY DineINOrder.orderID";
            objCmd.CommandType = CommandType.Text;
            DataSet        objDS = new DataSet();
            SqlDataAdapter objDA = new SqlDataAdapter();

            objDA.SelectCommand = objCmd;
            con.Open();
            objDA.Fill(objDS);
            con.Close();
            RepeaterDineIN.DataSource = objDS;
            RepeaterDineIN.DataBind();
        }
Ejemplo n.º 2
0
        protected void DineINCalender_SelectionChanged(object sender, EventArgs e)
        {
            DateTime dtSeleted = CalDineIN.SelectedDate;

            CalLabel.Text = dtSeleted.ToShortDateString();
            SqlCommand cmd = new SqlCommand();

            cmd.Connection  = con;
            cmd.CommandText = "Select * from DineINOrder Where [Date] = '" + dtSeleted.ToShortDateString() + "'";
            SqlDataAdapter da = new SqlDataAdapter();

            da.SelectCommand             = cmd;
            da.SelectCommand.CommandType = CommandType.Text;
            DataSet ds = new DataSet();

            con.Open();
            da.Fill(ds);
            con.Close();
            RepeaterDineIN.DataSource = ds;
            RepeaterDineIN.DataBind();
            CalDineIN.Visible = false;
        }