Ejemplo n.º 1
0
 public void Delete_CAR(string ID_CAR)
 {
     DAL.Data_access_layer DAL = new DAL.Data_access_layer();
     DAL.open();
     SqlParameter[] param = new SqlParameter[1];
     param[0]       = new SqlParameter("@ID", SqlDbType.VarChar, 25);
     param[0].Value = ID_CAR;
     DAL.Executecommand("Delete_CAR", param);
     DAL.close();
 }
 public void DELETE_CLIENT(string ID_CUSTOMER)
 {
     DAL.Data_access_layer DAL = new DAL.Data_access_layer();
     DAL.open();
     SqlParameter[] param = new SqlParameter[1];
     param[0]       = new SqlParameter("@ID_CUSTOMER", SqlDbType.VarChar, 25);
     param[0].Value = ID_CUSTOMER;
     DAL.Executecommand("DELETE_CLIENT", param);
     DAL.close();
 }
Ejemplo n.º 3
0
 public void DELETE_BILLS(string BILL_ID)
 {
     DAL.Data_access_layer DAL = new DAL.Data_access_layer();
     DAL.open();
     SqlParameter[] param = new SqlParameter[1];
     param[0]       = new SqlParameter("@BILL_ID", SqlDbType.VarChar, 25);
     param[0].Value = BILL_ID;
     DAL.Executecommand("DELETE_BILLS", param);
     DAL.close();
 }
Ejemplo n.º 4
0
        public DataTable login(string USERNAME, string PASSWORD)
        {
            DAL.Data_access_layer DAL   = new DAL.Data_access_layer();
            SqlParameter[]        param = new SqlParameter[2];
            param[0]       = new SqlParameter("@USERNAME", SqlDbType.VarChar, 25);
            param[0].Value = USERNAME;
            param[1]       = new SqlParameter("@PASSWORD", SqlDbType.VarChar, 25);
            param[1].Value = PASSWORD;
            DAL.open();
            DataTable dt = new DataTable();

            dt = DAL.SelectData("SP_LOGIN", param);
            DAL.close();
            return(dt);
        }
Ejemplo n.º 5
0
        public void UPDATE_BILLS(int BILL_ID, DateTime BILL_DATE, string BILL_STATUS, int TOTAL_AMOUNT, int ID_RESERVATION)
        {
            DAL.Data_access_layer DAL = new DAL.Data_access_layer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[5];
            param[0]       = new SqlParameter("@BILL_ID", SqlDbType.Int);
            param[0].Value = BILL_ID;
            param[1]       = new SqlParameter("@BILL_DATE", SqlDbType.Date);
            param[1].Value = BILL_DATE;
            param[2]       = new SqlParameter("@BILL_STATUS", SqlDbType.Char, 1);
            param[2].Value = BILL_STATUS;
            param[3]       = new SqlParameter("@TOTAL_AMOUNT", SqlDbType.Int);
            param[3].Value = TOTAL_AMOUNT;
            param[4]       = new SqlParameter("@ID_RESERVATION", SqlDbType.Int);
            param[4].Value = ID_RESERVATION;

            DAL.Executecommand("UPDATE_BILLS", param);
            DAL.close();
        }
Ejemplo n.º 6
0
 public void UPDATE_CAR(int ID_CAR, char AVAILABILITY_FLAG, string MODEL_NAME, int MODEL_YEAR, int MILEAGE, string CAR_CATEGORY_NAME)
 {
     DAL.Data_access_layer DAL = new DAL.Data_access_layer();
     DAL.open();
     SqlParameter[] param = new SqlParameter[6];
     param[0]       = new SqlParameter("@ID_C", SqlDbType.Int);
     param[0].Value = ID_CAR;
     param[1]       = new SqlParameter("@AVAILABILITY_FLAG", SqlDbType.Char, 1);
     param[1].Value = AVAILABILITY_FLAG;
     param[2]       = new SqlParameter("@MODEL_NAME", SqlDbType.VarChar, 25);
     param[2].Value = MODEL_NAME;
     param[3]       = new SqlParameter("@MODEL_YEAR", SqlDbType.Int);
     param[3].Value = MODEL_YEAR;
     param[4]       = new SqlParameter("@MILEAGE", SqlDbType.Int);
     param[4].Value = MILEAGE;
     param[5]       = new SqlParameter("@CAR_CATEGORY_NAME", SqlDbType.VarChar, 25);
     param[5].Value = CAR_CATEGORY_NAME;
     DAL.Executecommand("UPDATE_CAR", param);
     DAL.close();
 }
 public void UPDATE_RESERVATION(int ID_RESERVATION, DateTime DATE_RESERVATION, int RENTAL_DAYS, string STATUS, string MODEL_NAME, string CIN_COSTUMER)
 {
     DAL.Data_access_layer DAL = new DAL.Data_access_layer();
     DAL.open();
     SqlParameter[] param = new SqlParameter[6];
     param[0]       = new SqlParameter("@ID_RESERVATION", SqlDbType.Int);
     param[0].Value = ID_RESERVATION;
     param[1]       = new SqlParameter("DATE_RESERVATION", SqlDbType.Date);
     param[1].Value = DATE_RESERVATION;
     param[2]       = new SqlParameter("@RENTAL_DAYS", SqlDbType.Int);
     param[2].Value = RENTAL_DAYS;
     param[3]       = new SqlParameter("@STATUS", SqlDbType.Char, 1);
     param[3].Value = STATUS;
     param[4]       = new SqlParameter("@MODEL_NAME", SqlDbType.VarChar, 25);
     param[4].Value = MODEL_NAME;
     param[5]       = new SqlParameter("@CIN_COSTUMER", SqlDbType.VarChar, 25);
     param[5].Value = CIN_COSTUMER;
     DAL.Executecommand("UPDATE_RESERVATION", param);
     DAL.close();
 }
Ejemplo n.º 8
0
 public void UPDATE_RESERVATION(int BOOKING_ID, DateTime DATE_RESERVATION, int AMOUNT, string STATUS, string MODEL_NAME, string CIN)
 {
     DAL.Data_access_layer DAL = new DAL.Data_access_layer();
     DAL.open();
     SqlParameter[] param = new SqlParameter[6];
     param[0]       = new SqlParameter("@BOOKING_ID", SqlDbType.Int);
     param[0].Value = BOOKING_ID;
     param[1]       = new SqlParameter("DATE_RESERVATION", SqlDbType.Date);
     param[1].Value = DATE_RESERVATION;
     param[2]       = new SqlParameter("@AMOUNT", SqlDbType.Int);
     param[2].Value = AMOUNT;
     param[3]       = new SqlParameter("@STATUS", SqlDbType.Char, 1);
     param[3].Value = STATUS;
     param[4]       = new SqlParameter("@MODEL_NAME", SqlDbType.VarChar, 25);
     param[4].Value = MODEL_NAME;
     param[5]       = new SqlParameter("@CIN", SqlDbType.VarChar, 25);
     param[5].Value = CIN;
     DAL.Executecommand("UPDATE_RESERVATION", param);
     DAL.close();
 }
 public void UPDATE_CLIENT(int ID_CUSTOMER, string CIN, string FNAME, string LNAME, int PHONE_NUMBER, string DRIVER_LICENSE)
 {
     DAL.Data_access_layer DAL = new DAL.Data_access_layer();
     DAL.open();
     SqlParameter[] param = new SqlParameter[6];
     param[0]       = new SqlParameter("@ID_CUSTOMER", SqlDbType.Int);
     param[0].Value = ID_CUSTOMER;
     param[1]       = new SqlParameter("@CIN", SqlDbType.VarChar, 25);
     param[1].Value = CIN;
     param[2]       = new SqlParameter("@FNAME", SqlDbType.VarChar, 25);
     param[2].Value = FNAME;
     param[3]       = new SqlParameter("@LNAME", SqlDbType.VarChar, 25);
     param[3].Value = LNAME;
     param[4]       = new SqlParameter("@PHONE_NUMBER", SqlDbType.Int);
     param[4].Value = PHONE_NUMBER;
     param[5]       = new SqlParameter("@DRIVER_LICENSE", SqlDbType.VarChar, 25);
     param[5].Value = DRIVER_LICENSE;
     DAL.Executecommand("UPDATE_CLIENT", param);
     DAL.close();
 }
Ejemplo n.º 10
0
 public void update_manager(int ID_eddit, string USERNAME, string PASSWORD, string FULLNAME, string usertype, int phone, string email)
 {
     DAL.Data_access_layer DAL = new DAL.Data_access_layer();
     DAL.open();
     SqlParameter[] param = new SqlParameter[7];
     param[0]       = new SqlParameter("@ID_edit", SqlDbType.Int);
     param[0].Value = ID_eddit;
     param[1]       = new SqlParameter("@USERNAME", SqlDbType.VarChar, 25);
     param[1].Value = USERNAME;
     param[2]       = new SqlParameter("@PASSWORD", SqlDbType.VarChar, 25);
     param[2].Value = PASSWORD;
     param[3]       = new SqlParameter("@FULLNAME", SqlDbType.VarChar, 25);
     param[3].Value = FULLNAME;
     param[4]       = new SqlParameter("@usertype", SqlDbType.VarChar, 25);
     param[4].Value = usertype;
     param[5]       = new SqlParameter("@phone", SqlDbType.Int);
     param[5].Value = phone;
     param[6]       = new SqlParameter("@email", SqlDbType.VarChar, 25);
     param[6].Value = email;
     DAL.Executecommand("update_manager", param);
     DAL.close();
 }