using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Web; namespace Fab2ApprovalSystem.Models { /// /// /// [Serializable] public class LTWorkRequest { public int ID{ get; set; } public int SWRNumber{ get; set; } public bool RecordLockIndicator{ get; set; } public int RecordLockedBy { get; set; } public string RecordLockByName { get; set; } public byte CurrentStep { get; set; } public int Revision{ get; set; } public bool IsCurrentRevision { get; set; } public int OriginatorID{ get; set; } public DateTime? OriginatedDate { get; set; } public DateTime? SubmitedDate { get; set; } public DateTime? CloseDate { get; set; } public int Status{ get; set; } public bool IsITAR{ get; set; } public string Title{ get; set; } public char? LotType{ get; set; } public string PCRBNumber{ get; set; } public int? EngLotStartRequired{ get; set; } public int? LotTypeConversion{ get; set; } public int? QualLot{ get; set; } public string PurposeOfRequest{ get; set; } public DateTime? PlannedLotStartDate{ get; set; } public DateTime? PlannedScheduledCloseDate{ get; set; } public string ChargeDepartment{ get; set; } public string AllocationToUse{ get; set; } public int? PredictedCyleTime{ get; set; } public string ChargesForRawWafers{ get; set; } public string DeptChargedForRawWafers{ get; set; } public string DeptOwnerForRawWafers{ get; set; } public string FabCost{ get; set; } public string DeptChargedForFabCost{ get; set; } public string SignOn{ get; set; } public string Verb1{ get; set; } public DateTime? EstimatedBinCLoseDate { get; set; } public int? TotalQty { get; set; } public int? StartQty{ get; set; } public string Verb2{ get; set; } public string WIPArea{ get; set; } public DateTime? LotStartDate{ get; set; } public string LotNumber { get; set; } public string WIPPartNumber{ get; set; } public string PartDescription { get; set; } public string DefaultEPISiliconPartNumber { get; set; } public string ProcessFlow{ get; set; } public string EmployeeID{ get; set; } public string VerbComment{ get; set; } public int? RecordSiliconLotInSPNTapeTagTotrav { get;set;} public string SiliconLotNoCassette1 { get; set; } public bool SiliconOnHand { get; set; } public DateTime? SiliconExpectedDueDate { get; set; } public string SiliconComments { get; set; } public bool ReticleOnHand { get; set; } public DateTime? ReticleExpectedDueDate { get; set; } public string ReticleComments { get; set; } public bool SPNTransferOnHand { get; set; } public DateTime? SPNTransferExpectedDueDate { get; set; } public string SPNTransferComments { get; set; } public bool ProbeCardOnHand { get; set; } public DateTime? ProbeCardExpectedDueDate { get; set; } public string ProbeCardComments { get; set; } public bool ProbeRecipeOnHand { get; set; } public DateTime? ProbeRecipeExpectedDueDate { get; set; } public string ProbeRecipeComments { get; set; } public bool ProcessChangeDetailsOnHand { get; set; } public DateTime? ProcessChangeDetailsDueDate { get; set; } public string LotStartCheckListComments { get; set; } public LTHoldStep LTHoldStep { get; set; } public LTWorkRequestAttachment WorkRequestAttachment { get; set; } public int LotCount { get; set; } // View Model attributes public List DepartmentIDs { get; set; } public List ModuleIDs { get; set; } public string OriginatorName { get; set; } public string RevisionComments { get; set; } public LTMaterial LTMaterial { get; set; } public int PreviousWorkRequestID { get; set; } public int WorkFlowNumber { get; set; } public string ApprovalStatus { get { return Status == 1? "Approved" : "Pending"; } } public LTWorkRequest() { DepartmentIDs = new List(); ModuleIDs = new List(); LTHoldStep = new LTHoldStep(); LTMaterial = new LTMaterial(); } } public class LTMaterial { public int ID { get; set; } [Display(Name = "WIP Part #")] public string WIPPartNumber { get; set; } [Display(Name = "EPI Silicon Part#")] public string EPISiliconPartNumber { get; set; } public int Quantity { get; set; } public string Supplier { get; set; } public string Source { get; set; } public int LTWorkRequestID { get; set; } public int PreviousMaterialID { get; set; } } /// /// /// public class LTAffectedDepartment { public int ID { get; set; } public int DepartmentID { get; set; } public int LTWorkRequestID { get; set; } } /// /// /// public class LTAffectedModule { public int ID { get; set; } public int ModuleID { get; set; } public int LTWorkRequestID { get; set; } } /// /// /// //public class LTMaterial //{ // public int ID { get; set; } // public string WIPPartNumber { get; set; } // public string Description { get; set; } // public string EPISiliconPartNumber { get; set; } // public int Quantity { get; set; } // public string Supplier { get; set; } // public int LTWorkRequestID { get; set; } // public LTMaterial() // { // Description = ""; // } //} /// /// /// public class LTLotStartCheckList { public int ID { get; set; } public string Item { get; set; } public bool OnHand { get; set; } public DateTime? ExpectedDueDate { get; set; } public int LTWorkRequestID { get; set; } public string Comments { get; set; } } /// /// /// public class LTHoldStep { public int ID { get; set; } public string BaseFlow { get; set; } public string Location { get; set; } [Display(Name="Seq")] public string OperSequence { get; set; } public string Operation { get; set; } public string OperationDescription { get; set; } public string ChangeInstructions { get; set; } public string FileNames { get; set; } public int LTWorkRequestID { get; set; } public int UpdatedBy { get; set; } public LTWorkRequestAttachment LTWorkRequestAttachment { get; set; } public int Revision { get; set; } public int SWRNumber { get; set; } public int currentStep { get; set; } public int PreviousHoldStepID { get; set; } public LTHoldStep() { LTWorkRequestAttachment = new LTWorkRequestAttachment(); } } /// /// /// public class LTWorkRequestAttachment { public int ID { get; set; } public string FileGUID { get; set; } public string FileName { get; set; } public string DocType { get; set; } public string Comments { get; set; } public DateTime? UploadDateTime { get; set; } public int LTHoldStepID { get; set; } public string UploadedByName { get; set; } public int UploadedByID { get; set; } public int Revision { get; set; } public int WorkRequestID { get; set; } public int SWRNumber { get; set; } public string FileExtension { get; set; } public int PreviousWorkRequestAttachmentID { get; set; } } /// /// /// public class LTLotTravelerHeaderViewModel { public int ID { get; set; } public int SWRNumber { get; set; } public string LotNumber { get; set; } public string Title { get; set; } // public string Status { get; set; } // public string Originator { get; set; } // public string WIPPartNumber { get; set; } public string PartDescription { get; set; } public string BaseFlow { set; get; } public bool IsITAR { set; get; } public DateTime? LastUpdate { get; set; } public string LastUpdatedBy { get; set; } public string PurposeOfRequest { get; set; } //public int Quantity { get; set; } //public bool TravelerAttachedToLot { get; set; } public int LotTravCurrentRevision { get; set; } public LTLotTravelerHoldSteps LTLotTravelerHoldStep { get; set; } public bool IsCurrentRevision { get; set; } //public string Comments { get; set; } public int LTWorkRequestID { get; set; } public int LotTravRevID { get; set; } public bool RecordLockIndicator { get; set; } public int RecordLockedBy { get; set; } public int RecordLockedByName { get; set; } public List Revisions { get; set; } public bool TravelerClosed { get; set; } public DateTime? TravelerClosedDate { get; set; } public string TravelerClosedBy { get; set; } public string TravelerClosedReason { get; set; } public int WorkReqRevision { get; set; } public string TravelerStatus { get { return TravelerClosedDate == null ? "Open" : "Closed"; } } public LTLotTravelerHeaderViewModel() { LTLotTravelerHoldStep = new LTLotTravelerHoldSteps(); } } /// /// /// public class LTLot { public int ID { get; set; } public int WorkRequestID { get; set; } public string LotNumber { get; set; } public string WIPPartNumber { get; set; } public int WaferQty { get; set; } public string PartDescription { get; set; } public string Process { get; set; } public string Location { get; set; } public string Operation { get; set; } public string LotStatus { get; set; } public bool IsTravelerGenerated { get; set; } [Display(Name="Revision")] public int LotTravelerCurrentRevision { get; set; } public int LotUploadedBy { get; set; } public string UploadedByName { get; set; } public DateTime LotUploadDatetime { get; set; } public int WRWithExistingLot { get; set; } public string TravelerStatus { get; set; } public bool TravelerClosed { get; set; } public DateTime? TravelerClosedDate { get; set; } //public int RecordLockIndicator { get; set; } //public int RecordLockedBy { get; set; } //public DateTime? RecordLockedDateTime { get; set; } //public bool IsCurrentRevision { get; set;} //public int Revision { get; set; } [Display(Name = "")] public string ButtonAttrib { get { return (IsTravelerGenerated ? "True" : "False") + "~" + ID + "~" + WorkRequestID + "~" + LotStatus + "~" + TravelerStatus; } } } /// /// /// public class LTLotTravelerRevisionAttrib { public int ID { get; set; } public int LTLotID { get; set; } public int RevisionNumber { get; set; } public bool IsCurrentRevision { get; set; } public string Comments { get; set; } public int RecordLockIndicator { get; set; } public int RecordLockedBy { get; set; } public DateTime? RecordLockedDate { get; set; } public int TravelerLastUpdatedBy { get; set; } public DateTime? TraverlerLastUpdatedDatetime { get; set; } } public class LTLotTravlerHistory { } /// /// /// public class LTLotTravelerHoldSteps { public int ID { get; set; } public string Location { get; set; } public string Operation { get; set; } public string OperSequence { get; set; } public string Description { get; set; } public string OperationDescription { get; set; } public string ChangeInstructions { get; set; } public bool OLHoldInSPN { get; set; } public string ExecutionTaskComments { get; set; } public string EmployeeID { get; set; } public bool Completed { get; set; } public DateTime? SignOffTime { get; set; } public int SignedOffBy { get; set; } [Display(Name="SignedOff By")] public string SignedOffByName { get; set; } public int LotTravelerRevisionID { get; set; } public string RevisionComments { get; set; } public DateTime? UpdatedDateTime { get; set; } public int? UpdatedBy { get; set; } public int CurrentRevision { get; set; } // view model fields public string FileNames { get; set; } public int SWRNumber { get; set; } public int LTLotID { get; set; } public int WorkRequestID { get; set; } } /// /// /// public class LTLotTravAttachment { public int ID { get; set; } public string FileGUID { get; set; } public string FileName { get; set; } public string DocType { get; set; } public string Comments { get; set; } public int LotTravelerRevisionID { get; set; } public int LTLotTravHoldStepID { get; set; } public DateTime? UploadTime { get; set; } public int UploadedByID { get; set; } public string UploadedByName { get; set; } } /// public class BaseFlowLocation { public string Location { get; set; } } public class BaseFlowOperations { public string Operation { get; set; } public string OperationDesc { get; set; } public string OperCode { get; set; } public string SeqCode { get; set; } } /// public class BaseFlowLocationOperation { public string BaseFlow { get; set; } public string Location { get; set; } public string Operation { get; set; } } public class PartNumberAttrib { public string PartNumber { get; set; } public string SiliconAndDesc { get; set; } } public class Revision { public int ID { get; set; } public int RevisionNumber { get; set; } } public class LotWithTraveler { public int LotID { get; set; } public string LotNumber { get; set; } } public class RevisionHistory { public int ID { get; set; } public string RevisionedBy { get; set; } public string Comments { get; set; } public DateTime RevisionCreateDate { get; set; } } }