public string To_XML() { var ret = "<disk type='" + Device_Type.ToString() + "' device='" + Device_Device_Type.ToString() + "' "; if (Snapshot_Type != Snapshot_Types._default) { ret += "snapshot='" + Snapshot_Type.ToString().Replace("_", "") + "'"; } ret += ">"; ret += "<driver type='" + Driver_Type.ToString() + "' cache='" + Driver_Cache_Type.ToString().Replace("_", "") + "' />"; ret += Source.To_XML(); ret += "<target dev='"; if (Device_Bus_Type == Disk_Bus_Types.virtio) { ret += "vd"; } else if (Device_Bus_Type == Disk_Bus_Types.scsi) { ret += "sd"; } else { ret += "sd"; } ret += Letter + "' bus='" + Device_Bus_Type.ToString() + "' />"; if (ReadOnly) { ret += "<readonly/>"; } ret += "</disk>"; return(ret); }
public bool NewApplication(bool IsUniversityVehicle, bool IsRentalVehicle, bool IsPersonalVehicle, bool IsMultiPersonVehicle, string RegisID, string FirstName, string LastName, string MiddleInitial, DateTime DOB, string PrimaryPhone, string AlternatePhone, string Email, Driver_Type DriverType, Driver_Status DriverStatus, string DLNumber, string DLState, DateTime DLExpDate, string InsName, string InsPolicyNumber, DateTime InsPolicyExpDate, string SupervisorEmail) { return ITSDriverDAL.NewApplication(IsUniversityVehicle, IsRentalVehicle, IsPersonalVehicle, IsMultiPersonVehicle, RegisID, FirstName, LastName, MiddleInitial, DOB, PrimaryPhone, AlternatePhone, Email, DriverType, DriverStatus, DLNumber, DLState, DLExpDate, InsName, InsPolicyNumber, InsPolicyExpDate, SupervisorEmail); }
// Add Application public static bool NewApplication(bool IsUniversityVehicle, bool IsRentalVehicle, bool IsPersonalVehicle, bool IsMultiPersonVehicle, string RegisID, string FirstName, string LastName, string MiddleInitial, DateTime DOB, string PrimaryPhone, string AlternatePhone, string Email, Driver_Type DriverType, Driver_Status DriverStatus, string DLNumber, string DLState, DateTime DLExpDate, string InsName, string InsPolicyNumber, DateTime InsPolicyExpDate, string SupervisorEmail) { using (var db = new ITSDriverContext()) { db.Database.ExecuteSqlCommand( "EXEC SPCreateNewApplication @RegisID,@FirstName,@LastName,@MiddleInitial,@DOB,@PrimaryPhone,@AlternatePhone,@Email,@DriverType,@DriverStatus,@DLNumber,@DLState,@DLExpDate,@InsName,@InsPolicyNumber,@InsPolicyExpDate,@SupervisorEmail,@IsUniversityVehicle,@IsRentalVehicle,@IsPersonalVehicle,@IsMultiPersonVehicle", // Application specific new SqlParameter("@IsUniversityVehicle", IsUniversityVehicle), new SqlParameter("@IsRentalVehicle", IsRentalVehicle), new SqlParameter("@IsPersonalVehicle", IsPersonalVehicle), new SqlParameter("@IsMultiPersonVehicle", IsMultiPersonVehicle), // Driver specific new SqlParameter("@RegisID", RegisID), new SqlParameter("@FirstName", FirstName), new SqlParameter("@LastName", LastName), new SqlParameter("@MiddleInitial", MiddleInitial), new SqlParameter("@DOB", DOB), new SqlParameter("@PrimaryPhone", PrimaryPhone), new SqlParameter("@AlternatePhone", AlternatePhone), new SqlParameter("@Email", Email), new SqlParameter("@DriverType", DriverType), new SqlParameter("@DriverStatus", DriverStatus), new SqlParameter("@DLNumber", DLNumber), new SqlParameter("@DLState", DLState), new SqlParameter("@DLExpDate", DLExpDate), new SqlParameter("@InsName", InsName), new SqlParameter("@InsPolicyNumber", InsPolicyNumber), new SqlParameter("@InsPolicyExpDate", InsPolicyExpDate), new SqlParameter("@SupervisorEmail", SupervisorEmail) ); return true; } }