public void DeleteEmployee()
    {
        SqlParameter p = new SqlParameter("@EmpId", SqlDbType.Int);

        p.Value = _EmpId;
        SqlHelper.ExecuteNonQuery(ClsConnection.GetConnection(), CommandType.StoredProcedure, "Delete_Employee", p);
    }
    public int ShowBookingInfo()
    {
        SqlParameter p = new SqlParameter("@VehicleId", SqlDbType.VarChar);

        p.Value = _VehicleId;
        DataSet           ds  = SqlHelper.ExecuteDataset(ClsConnection.GetConnection(), CommandType.StoredProcedure, "DisplayBooking", p);
        DataRowCollection rec = ds.Tables[0].Rows;

        if (rec.Count > 0)
        {
            _BookingId     = Convert.ToInt16(rec[0]["BookingId"]);
            _DateOfBooked  = rec[0]["DateOfBooked"].ToString();
            _VehicleId     = rec[0]["VehicleId"].ToString();
            _UserId        = Convert.ToInt16(rec[0]["UserId"]);
            _TimeOfPeriod  = Convert.ToInt16(rec[0]["TimePeriod"]);
            _BookingAmount = Convert.ToInt32(rec[0]["BookingAmount"]);
            _AmountPaid    = rec[0]["AmountPaid"].ToString();
            _BookingStatus = Convert.ToInt16(rec[0]["BookingStatus"]);
            return(1);
        }
        else
        {
            return(0);
        }
    }
    public void InsertUserRegistration()
    {
        SqlParameter[] p = new SqlParameter[8];
        p[0]       = new SqlParameter("@UserName", SqlDbType.VarChar);
        p[0].Value = _UserName;

        p[1]       = new SqlParameter("@Surname", SqlDbType.VarChar);
        p[1].Value = _Surname;

        p[2]       = new SqlParameter("@EmailId", SqlDbType.VarChar);
        p[2].Value = _EmailId;

        p[3]       = new SqlParameter("@MobileNo", SqlDbType.VarChar);
        p[3].Value = _MobileNo;

        p[4]       = new SqlParameter("@Address", SqlDbType.VarChar);
        p[4].Value = _Address;

        p[5]       = new SqlParameter("@City", SqlDbType.VarChar);
        p[5].Value = _City;

        p[6]       = new SqlParameter("@State", SqlDbType.VarChar);
        p[6].Value = _State;

        p[7]       = new SqlParameter("@ZipCode", SqlDbType.VarChar);
        p[7].Value = _ZipCode;


        SqlHelper.ExecuteNonQuery(ClsConnection.GetConnection(), CommandType.StoredProcedure, "Insert_userRegistraion", p);
    }
    public int DisplayTotalAmount(string stat)
    {
        int i = 0;

        i = Convert.ToInt32(SqlHelper.ExecuteScalar(ClsConnection.GetConnection(), CommandType.Text, stat));
        return(i);
    }
 public DataSet GetVehicleDetails()
 {
     SqlParameter[] p = new SqlParameter[1];
     p[0]           = new SqlParameter("@VechicleId", VehicleId);
     p[0].SqlDbType = SqlDbType.VarChar;
     return(SqlHelper.ExecuteDataset(ClsConnection.GetConnection(), CommandType.StoredProcedure, "spDisplayVehicleById", p));
 }
    public void DeleteVehicle()
    {
        SqlParameter p = new SqlParameter("@VehicleId", SqlDbType.VarChar);

        p.Value = _VehicleId;
        SqlHelper.ExecuteNonQuery(ClsConnection.GetConnection(), CommandType.StoredProcedure, "delete_vehicle", p);
    }
    public void InsertEmployee()
    {
        SqlParameter[] p = new SqlParameter[9];

        p[0]       = new SqlParameter("@Ename", SqlDbType.VarChar);
        p[0].Value = _EmpName;

        p[1]       = new SqlParameter("@Surname", SqlDbType.VarChar);
        p[1].Value = _Surname;

        p[2]       = new SqlParameter("@Address", SqlDbType.VarChar);
        p[2].Value = _Address;

        p[3]       = new SqlParameter("@City", SqlDbType.VarChar);
        p[3].Value = _City;

        p[4]       = new SqlParameter("@State", SqlDbType.VarChar);
        p[4].Value = _State;

        p[5]       = new SqlParameter("@ZipCode", SqlDbType.Float);
        p[5].Value = _ZipCode;

        p[6]       = new SqlParameter("@WorkOnVehicle", SqlDbType.Int);
        p[6].Value = _WorkOnVehicle;

        p[7]       = new SqlParameter("@Salary", SqlDbType.Float);
        p[7].Value = _Salary;

        p[8]       = new SqlParameter("@JobDesc", SqlDbType.VarChar);
        p[8].Value = _JobDesc;

        SqlHelper.ExecuteNonQuery(ClsConnection.GetConnection(), CommandType.StoredProcedure, "Insert_Employee", p);
    }
예제 #8
0
    public void AcceptBooking()
    {
        SqlParameter[] p = new SqlParameter[6];
        p[0]       = new SqlParameter("@DateBooked", SqlDbType.VarChar);
        p[0].Value = _DateOfBooked;

        p[1]       = new SqlParameter("@VehicleId", SqlDbType.VarChar);
        p[1].Value = _VehicleId;

        p[2]       = new SqlParameter("@TimePeriod", SqlDbType.Int);
        p[2].Value = _TimeOfPeriod;


        p[3]       = new SqlParameter("@AmountPaid", SqlDbType.VarChar);
        p[3].Value = _AmountPaid;

        p[4]       = new SqlParameter("@BookingStatus", SqlDbType.Int);
        p[4].Value = _BookingStatus;

        p[5]       = new SqlParameter("@UserId", SqlDbType.Int);
        p[5].Value = _UserId;


        SqlHelper.ExecuteNonQuery(ClsConnection.GetConnection(), CommandType.StoredProcedure, "AddBookingInfo", p);
    }
예제 #9
0
    public DataSet   AvaliableVehicleByDate()
    {
        SqlParameter[] p = new SqlParameter[1];
        p[0]       = new SqlParameter("@DateOfBooked", SqlDbType.VarChar);
        p[0].Value = _DateOfBooked;
        DataSet ds = SqlHelper.ExecuteDataset(ClsConnection.GetConnection(), CommandType.StoredProcedure, "AvaliableVehicleByDate", p);

        return(ds);
    }
예제 #10
0
    public DataSet DisplayCancelBooking()
    {
        SqlParameter[] p = new SqlParameter[1];
        p[0]       = new SqlParameter("@BookingId", SqlDbType.Int);
        p[0].Value = _BookingId;
        DataSet ds = SqlHelper.ExecuteDataset(ClsConnection.GetConnection(), CommandType.StoredProcedure, "DisplayCancelBooking", p);

        return(ds);
    }
예제 #11
0
    public void InserUser()
    {
        SqlParameter [] p = new SqlParameter [2];
        p[0]       = new SqlParameter("@username", SqlDbType.VarChar);
        p[0].Value = _UserName;

        p[1]       = new SqlParameter("@password", SqlDbType.VarChar);
        p[1].Value = _PassWord;

        SqlHelper.ExecuteNonQuery(ClsConnection.GetConnection(), CommandType.StoredProcedure, "Insert_EmpUsers", p);
    }
예제 #12
0
    public DataSet MupleSearchDisplay()
    {
        SqlParameter[] p = new SqlParameter[2];
        p[0]       = new SqlParameter("@VehicleId", SqlDbType.VarChar);
        p[0].Value = _VehicleId;

        p[1]       = new SqlParameter("@DateOfBooked", SqlDbType.VarChar);
        p[1].Value = _DateOfBooked;

        DataSet ds = SqlHelper.ExecuteDataset(ClsConnection.GetConnection(), CommandType.StoredProcedure, "SpMultipleSearch", p);

        return(ds);
    }
예제 #13
0
    public bool  CheckAvalibility(string stat)
    {
        SqlDataReader dr = SqlHelper.ExecuteReader(ClsConnection.GetConnection(), CommandType.Text, stat);

        dr.Read();
        if (dr.HasRows)
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }
    public void  DisplayPackage()
    {
        SqlParameter[] p = new SqlParameter[1];
        p[0]       = new SqlParameter("@PackageId", SqlDbType.Int);
        p[0].Value = _PackageId;
        DataSet           ds  = SqlHelper.ExecuteDataset(ClsConnection.GetConnection(), CommandType.StoredProcedure, "DiplayAvaliabePackage", p);
        DataRowCollection rec = ds.Tables[0].Rows;

        if (rec.Count > 0)
        {
            _Details  = rec[0]["Details"].ToString();
            _NoOfDays = Convert.ToInt32(rec[0]["NoOfDays"]);
            _Price    = Convert.ToInt32(rec[0]["Price"]);
        }
    }
예제 #15
0
    public int CancelBooking()
    {
        SqlParameter[] p = new SqlParameter[3];
        p[0]       = new SqlParameter("@BookingId", SqlDbType.Int);
        p[0].Value = _BookingId;

        p[1]       = new SqlParameter("@DateOfBooked", SqlDbType.VarChar);
        p[1].Value = _DateOfBooked;

        p[2]           = new SqlParameter("@str", SqlDbType.Int);
        p[2].Direction = ParameterDirection.Output;

        SqlHelper.ExecuteScalar(ClsConnection.GetConnection(), CommandType.StoredProcedure, "CancelBooking", p);
        //SqlHelper.ExecuteNonQuery(ClsConnection.GetConnection(), CommandType.StoredProcedure, "CancelBooking", p);
        return((int)p[2].Value);
    }
예제 #16
0
    public void DisplyVehicleInfo()
    {
        SqlParameter p = new SqlParameter("@VehicleId", SqlDbType.VarChar);

        p.Value = _VehicleId;
        DataSet           ds  = SqlHelper.ExecuteDataset(ClsConnection.GetConnection(), CommandType.StoredProcedure, "DisplayVehicleAvaliability", p);
        DataRowCollection rec = ds.Tables[0].Rows;

        if (rec.Count > 0)
        {
            _Description = rec[0]["Description"].ToString();
            _Model       = rec[0]["Model"].ToString();
            _Make        = rec[0]["Make"].ToString();
            _VehicleType = Convert.ToInt32(rec[0]["VehicleType"]);
            _RatePerDay  = Convert.ToInt32(rec[0]["RatePerDay"]);
            //_BookingStatus = Convert.ToInt32(rec[0]["BookingStatus"]);
        }
    }
    public void InsertUserLogn()
    {
        SqlParameter[] p = new SqlParameter[4];
        p[0]       = new SqlParameter("@username", SqlDbType.VarChar);
        p[0].Value = _UserName;

        p[1]       = new SqlParameter("@password", SqlDbType.VarChar);
        p[1].Value = _PassWord;


        p[2]       = new SqlParameter("@HintQuestion", SqlDbType.VarChar);
        p[2].Value = _HintQuestion;


        p[3]       = new SqlParameter("@Answer", SqlDbType.VarChar);
        p[3].Value = _Answer;

        SqlHelper.ExecuteNonQuery(ClsConnection.GetConnection(), CommandType.StoredProcedure, "Insert_LoginUsers", p);
    }
    public void BookPackage()
    {
        SqlParameter[] p = new SqlParameter[4];
        p[0]       = new SqlParameter("@PackageId", SqlDbType.Int);
        p[0].Value = _PackageId;

        p[1]       = new SqlParameter("@VehicleId", SqlDbType.VarChar);
        p[1].Value = _VehicleId;



        p[2]       = new SqlParameter("@UserId", SqlDbType.VarChar);
        p[2].Value = _UserId;

        p[3]       = new SqlParameter("@DateOfBook", SqlDbType.VarChar);
        p[3].Value = _DateOfBook;



        SqlHelper.ExecuteNonQuery(ClsConnection.GetConnection(), CommandType.StoredProcedure, "BookPackage", p);
    }
    public bool ValiDateUser()
    {
        SqlParameter[] p = new SqlParameter[2];
        p[0]       = new SqlParameter("@username", SqlDbType.VarChar);
        p[0].Value = _UserName;

        p[1]       = new SqlParameter("@password", SqlDbType.VarChar);
        p[1].Value = _PassWord;

        SqlDataReader dr;

        dr = SqlHelper.ExecuteReader(ClsConnection.GetConnection(), CommandType.StoredProcedure, "Validate_LoginUsers", p);
        dr.Read();
        if (dr.HasRows)
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }
    public void UpdateVehicle()
    {
        SqlParameter[] p = new SqlParameter[6];
        p[0]       = new SqlParameter("@VehicleId", SqlDbType.VarChar);
        p[0].Value = _VehicleId;


        p[1]       = new SqlParameter("@Description", SqlDbType.VarChar);
        p[1].Value = _Description;

        p[2]       = new SqlParameter("@Model", SqlDbType.VarChar);
        p[2].Value = _Model;

        p[3]       = new SqlParameter("@Make", SqlDbType.VarChar);
        p[3].Value = _Make;

        p[4]       = new SqlParameter("@vehicletype", SqlDbType.Int);
        p[4].Value = _VehicleType;

        p[5]       = new SqlParameter("@RatePerDay", SqlDbType.Float);
        p[5].Value = _RatePerDay;
        SqlHelper.ExecuteNonQuery(ClsConnection.GetConnection(), CommandType.StoredProcedure, "update_vehicle", p);
    }
    public DataSet GetVehicleId()
    {
        string SqlStat = "Select vehicleId from tblVehicle";

        return(SqlHelper.ExecuteDataset(ClsConnection.GetConnection(), CommandType.Text, SqlStat));
    }
예제 #22
0
 public void UpdateBookingInfo(string stat)
 {
     SqlHelper.ExecuteNonQuery(ClsConnection.GetConnection(), CommandType.Text, stat);
 }
예제 #23
0
    public DataSet GetUserId(string stat)
    {
        DataSet ds = SqlHelper.ExecuteDataset(ClsConnection.GetConnection(), CommandType.Text, stat);

        return(ds);
    }
    public DataSet DisplayConformBookings()
    {
        DataSet ds = SqlHelper.ExecuteDataset(ClsConnection.GetConnection(), CommandType.StoredProcedure, "AdminBookingConformDiplay");

        return(ds);
    }
예제 #25
0
    public DataSet DisplayBookingInfo(string stat)
    {
        DataSet ds = SqlHelper.ExecuteDataset(ClsConnection.GetConnection(), CommandType.Text, stat);

        return(ds);
    }
    public DataSet DisplyEmployee(string Stat)
    {
        DataSet ds = SqlHelper.ExecuteDataset(ClsConnection.GetConnection(), CommandType.Text, Stat);

        return(ds);
    }
예제 #27
0
 public DataSet DisplayBookingReport()
 {
     return(SqlHelper.ExecuteDataset(ClsConnection.GetConnection(), CommandType.StoredProcedure, "spDisplayBookingInfo", null));
 }
예제 #28
0
    public DataSet DisplayVehicleReport()
    {
        string SqlStat = "select * from tblVehicle";

        return(SqlHelper.ExecuteDataset(ClsConnection.GetConnection(), CommandType.Text, SqlStat));
    }