public CS_CallLog_LocalEquipmentType ParseVOToCallLogEquipmentTypeEntity(int callLogID, LocalEquipmentTypeVO local, bool update)
        {
            CS_CallLog_LocalEquipmentType type = null;

            type = new CS_CallLog_LocalEquipmentType();
            type.Active = true;
            type.CallLogID = callLogID;
            type.CreatedBy = local.CreatedBy;
            type.CreationDate = local.CreationDate;
            type.CreationID = local.CreationID;
            type.LocalEquipmentTypeID = local.LocalEquipmentTypeID;
            type.Quantity = local.Quantity;
            type.CallLogID = callLogID;
            type.ModificationDate = DateTime.Now;
            type.ModificationID = null;
            type.ModifiedBy = "System";

            if (update)
                type.ID = local.ID;
            return type;
        }
Пример #2
0
        /// <summary>
        /// Get the LocationInfo Entity related to a Specific Job
        /// </summary>
        /// <returns>A CS_LocationInfo Entity</returns>
        public virtual IList<LocalEquipmentTypeVO> GetEquipmentRequestedVOByJob(int jobId)
        {
            IList<CS_Job_LocalEquipmentType> list = GetEquipmentRequestedByJob(jobId);
            IList<LocalEquipmentTypeVO> returnList = new List<LocalEquipmentTypeVO>();

            for (int i = 0; i < list.Count; i++)
            {
                LocalEquipmentTypeVO item = new LocalEquipmentTypeVO();
                item.ID = list[i].ID;
                item.LocalEquipmentTypeID = list[i].LocalEquipmentTypeID;
                item.Name = list[i].CS_LocalEquipmentType.Name + ((!string.IsNullOrEmpty(list[i].SpecificEquipment))? " - " + list[i].SpecificEquipment: "");
                item.Quantity = list[i].Quantity;
                item.CreatedBy = list[i].CreatedBy;
                item.CreationDate = list[i].CreationDate;

                returnList.Add(item);
            }

            return returnList;
        }
        public LocalEquipmentTypeVO ParseCallLogEquipmentTypeEntityToVO(CS_CallLog_LocalEquipmentType callLogEqType)
        {
            LocalEquipmentTypeVO type = null;

            type = new LocalEquipmentTypeVO();
            type.CreatedBy = callLogEqType.CreatedBy;
            type.CreationDate = callLogEqType.CreationDate;
            type.CreationID = callLogEqType.CreationID;
            type.LocalEquipmentTypeID = callLogEqType.LocalEquipmentTypeID;
            type.Quantity = callLogEqType.Quantity;
            type.Name = callLogEqType.CS_LocalEquipmentType.Name;
            type.ID = callLogEqType.ID;

            return type;
        }