Esempio n. 1
0
        public void updateReservationTitle(eReservationTitle e)
        {
            tbl_ReservationTitle temp = db.tbl_ReservationTitles.Where(x => x.ReservationID == e.ReservationID).FirstOrDefault();

            temp.ReservationID = e.ReservationID;
            temp.TitleID       = e.TitleID;


            db.SubmitChanges();
        }
Esempio n. 2
0
        public void insertReservationTitle(eReservationTitle e)
        {
            tbl_ReservationTitle temp = new tbl_ReservationTitle();

            temp.ReservationID = e.ReservationID;
            temp.TitleID       = e.TitleID;

            db.tbl_ReservationTitles.InsertOnSubmit(temp);
            db.SubmitChanges();
        }
Esempio n. 3
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            eReservationTitle temp = new eReservationTitle();

            temp.ReservationID = Convert.ToInt32(txtReservationID.Text);
            temp.TitleID       = Convert.ToInt32(txtTitleID.Text);


            rtbll.updateReservationTitle(temp);

            LoadDataGridView(dgvReservationTitle, rtbll.getAllRTbyReservationID(Convert.ToInt32(txtReservationID.Text)));
        }
Esempio n. 4
0
        private void btnadd_Click(object sender, EventArgs e)
        {
            eReservationTitle d = new eReservationTitle();

            txtReservationID.Text = Reservationid.ToString();
            d.ReservationID       = Convert.ToInt32(txtReservationID.Text);
            d.TitleID             = Convert.ToInt32(txtTitleID.Text);

            rtbll.insertReservationTitle(d);
            //diskrentalbll.ins(rental);

            LoadDataGridView(dgvReservationTitle, rtbll.getAllRTbyReservationID(Convert.ToInt32(txtReservationID.Text)));
        }
Esempio n. 5
0
        public List <eReservationTitle> getAllRTbyReservationID(int rid)
        {
            List <eReservationTitle> ls = new List <eReservationTitle>();
            var list = db.tbl_ReservationTitles.Where(x => x.ReservationID == rid).ToList();

            foreach (tbl_ReservationTitle item in list)
            {
                eReservationTitle temp = new eReservationTitle();
                temp.ReservationID = item.ReservationID;
                temp.TitleID       = item.TitleID;

                ls.Add(temp);
            }
            return(ls);
        }
Esempio n. 6
0
        public List <eReservationTitle> getAllReservationTitle()
        {
            List <eReservationTitle> ls = new List <eReservationTitle>();

            foreach (tbl_ReservationTitle item in db.tbl_ReservationTitles.ToList())
            {
                eReservationTitle temp = new eReservationTitle();
                temp.ReservationID = item.ReservationID;
                temp.TitleID       = item.TitleID;



                ls.Add(temp);
            }

            return(ls);
        }