public static string DeleteDriverByID_String(int driverid) { dbconn = new DBConnectionServices("JCIConnection"); dbconn.SetSqlCommandStoredProcedure("DeleteDriver"); dbconn.AddParameterToList("DriverID", SqlDbType.Int, driverid); dbconn.SetSqlParameters(); return(dbconn.ExecuteStoredProcedureString()); }
public static string CreateContract_String(Contract contract) { dbconn = new DBConnectionServices("JCIConnection"); dbconn.SetSqlCommandStoredProcedure("InsertContract"); dbconn.AddParameterToList("contractname", SqlDbType.Text, contract.ContractName); dbconn.AddParameterToList("statename", SqlDbType.Text, contract.StateName); dbconn.SetSqlParameters(); return(dbconn.ExecuteStoredProcedureString()); }
public static string CreateLocation_String(Location location) { dbconn = new DBConnectionServices("JCIConnection"); dbconn.SetSqlCommandStoredProcedure("InsertLocation"); dbconn.AddParameterToList("LocationName", SqlDbType.Text, location.LocationName); dbconn.AddParameterToList("Address", SqlDbType.Text, location.Address); dbconn.SetSqlParameters(); return(dbconn.ExecuteStoredProcedureString()); }
public static string CreateRoutePickUp_String(string pickuplocationname) { dbconn = new DBConnectionServices("JCIConnection"); dbconn.SetSqlCommandStoredProcedure("InsertRoutePickUp"); dbconn.AddParameterToList("pickuptime", SqlDbType.DateTime, DateTime.Now); dbconn.AddParameterToList("pickuplocationname", SqlDbType.Text, pickuplocationname); dbconn.SetSqlParameters(); return(dbconn.ExecuteStoredProcedureString()); }
public static string CreateSignee_String(Signee signee) { dbconn = new DBConnectionServices("JCIConnection"); dbconn.SetSqlCommandStoredProcedure("InsertSignee"); dbconn.AddParameterToList("FirstName", SqlDbType.Text, signee.FirstName); dbconn.AddParameterToList("LastName", SqlDbType.Text, signee.LastName); dbconn.SetSqlParameters(); return(dbconn.ExecuteStoredProcedureString()); }
public static string CreateRouteDropOff_String(int routeid, string dropofflocationname) { dbconn = new DBConnectionServices("JCIConnection"); dbconn.SetSqlCommandStoredProcedure("InsertRouteDropOff"); dbconn.AddParameterToList("dropofftime", SqlDbType.DateTime, DateTime.Now); dbconn.AddParameterToList("dropofflocationname", SqlDbType.Text, dropofflocationname); dbconn.AddParameterToList("routeid", SqlDbType.Int, routeid); dbconn.SetSqlParameters(); return(dbconn.ExecuteStoredProcedureString()); }
public static string CreateDriver_String(Driver driver) { dbconn = new DBConnectionServices("JCIConnection"); dbconn.SetSqlCommandStoredProcedure("InsertDriver"); dbconn.AddParameterToList("FirstName", SqlDbType.Text, driver.FirstName); dbconn.AddParameterToList("LastName", SqlDbType.Text, driver.LastName); dbconn.AddParameterToList("StartDate", SqlDbType.Date, driver.StartDate); dbconn.AddParameterToList("EndDate", SqlDbType.Date, driver.EndDate); dbconn.AddParameterToList("BadgeNumber", SqlDbType.Text, driver.BadgeNumber); dbconn.SetSqlParameters(); return(dbconn.ExecuteStoredProcedureString()); }
public static string UpdateRoute_String(Route route) { dbconn = new DBConnectionServices("JCIConnection"); dbconn.SetSqlCommandStoredProcedure("UpdateRoute"); dbconn.AddParameterToList("routeid", SqlDbType.Int, route.ID); dbconn.AddParameterToList("pickuptime", SqlDbType.DateTime, Convert.ToDateTime(route.PickUpTime)); dbconn.AddParameterToList("dropofftime", SqlDbType.DateTime, Convert.ToDateTime(route.DropOffTime)); dbconn.AddParameterToList("pickuplocation", SqlDbType.Text, route.PickUpLocation.LocationName); dbconn.AddParameterToList("dropofflocation", SqlDbType.Text, route.DropOffLocation.LocationName); dbconn.AddParameterToList("status", SqlDbType.Int, (int)route.Status); dbconn.SetSqlParameters(); return(dbconn.ExecuteStoredProcedureString()); }