public virtual Apps.Models.SCV.TRANSFER.TRANSFER_LOCATE_REQUEST_MODEL GetById(string id) { Apps.Models.TRANSFER_LOCATE_REQUEST entity = m_Rep.GetById(id); if (entity != null) { //TRANSFER_LOCATE_REQUEST entity = m_Rep.GetById(id); Apps.Models.SCV.TRANSFER.TRANSFER_LOCATE_REQUEST_MODEL model = new Apps.Models.SCV.TRANSFER.TRANSFER_LOCATE_REQUEST_MODEL(); model.INTERNAL_TRANS_LOC_NUM = entity.INTERNAL_TRANS_LOC_NUM; model.WAREHOUSE = entity.WAREHOUSE; model.COMPANY = entity.COMPANY; model.ITEM = entity.ITEM; model.ITEM_DESC = entity.ITEM_DESC; model.LOCATE_QTY = entity.LOCATE_QTY; model.QUANTITY_UM = entity.QUANTITY_UM; model.ATTRIBUTE_NUM = entity.ATTRIBUTE_NUM; model.INVENTORY_STS = entity.INVENTORY_STS; model.FROM_LOC = entity.FROM_LOC; model.TO_LOC = entity.TO_LOC; model.FROM_LPN = entity.FROM_LPN; model.FROM_TEMPLATE_FIELD1 = entity.FROM_TEMPLATE_FIELD1; model.FROM_TEMPLATE_FIELD2 = entity.FROM_TEMPLATE_FIELD2; model.FROM_TEMPLATE_FIELD3 = entity.FROM_TEMPLATE_FIELD3; model.FROM_TEMPLATE_FIELD4 = entity.FROM_TEMPLATE_FIELD4; model.FROM_TEMPLATE_FIELD5 = entity.FROM_TEMPLATE_FIELD5; model.TO_TEMPLATE_FIELD1 = entity.TO_TEMPLATE_FIELD1; model.TO_TEMPLATE_FIELD2 = entity.TO_TEMPLATE_FIELD2; model.TO_TEMPLATE_FIELD3 = entity.TO_TEMPLATE_FIELD3; model.TO_TEMPLATE_FIELD4 = entity.TO_TEMPLATE_FIELD4; model.TO_TEMPLATE_FIELD5 = entity.TO_TEMPLATE_FIELD5; model.FROM_ZONE = entity.FROM_ZONE; model.CONVERTED_QTY = entity.CONVERTED_QTY; model.CONVERTED_QTY_UM = entity.CONVERTED_QTY_UM; model.TASK_CREATED = entity.TASK_CREATED; model.TRANSFER_ID = entity.TRANSFER_ID; model.INTERNAL_TRANSFER_NUM = entity.INTERNAL_TRANSFER_NUM; model.INTERNAL_TRANSFER_LINE_NUM = entity.INTERNAL_TRANSFER_LINE_NUM; model.CREATED_USER = entity.CREATED_USER; model.CREATED_DATE_TIME = entity.CREATED_DATE_TIME; model.INTERNAL_WAVE_NUM = entity.INTERNAL_WAVE_NUM; model.CART_ID = entity.CART_ID; model.TO_ZONE = entity.TO_ZONE; model.CART_POS = entity.CART_POS; return(model); } else { return(null); } }
public virtual void Create(ref ValidationErrors errors, Apps.Models.SCV.TRANSFER.TRANSFER_LOCATE_REQUEST_MODEL model) { Apps.Models.TRANSFER_LOCATE_REQUEST entity = m_Rep.GetById(model.INTERNAL_TRANS_LOC_NUM); if (entity != null) { errors.Add(Resource.PrimaryRepeat); return; } entity = new Apps.Models.TRANSFER_LOCATE_REQUEST(); entity.INTERNAL_TRANS_LOC_NUM = model.INTERNAL_TRANS_LOC_NUM; entity.WAREHOUSE = model.WAREHOUSE; entity.COMPANY = model.COMPANY; entity.ITEM = model.ITEM; entity.ITEM_DESC = model.ITEM_DESC; entity.LOCATE_QTY = model.LOCATE_QTY; entity.QUANTITY_UM = model.QUANTITY_UM; entity.ATTRIBUTE_NUM = model.ATTRIBUTE_NUM; entity.INVENTORY_STS = model.INVENTORY_STS; entity.FROM_LOC = model.FROM_LOC; entity.TO_LOC = model.TO_LOC; entity.FROM_LPN = model.FROM_LPN; entity.FROM_TEMPLATE_FIELD1 = model.FROM_TEMPLATE_FIELD1; entity.FROM_TEMPLATE_FIELD2 = model.FROM_TEMPLATE_FIELD2; entity.FROM_TEMPLATE_FIELD3 = model.FROM_TEMPLATE_FIELD3; entity.FROM_TEMPLATE_FIELD4 = model.FROM_TEMPLATE_FIELD4; entity.FROM_TEMPLATE_FIELD5 = model.FROM_TEMPLATE_FIELD5; entity.TO_TEMPLATE_FIELD1 = model.TO_TEMPLATE_FIELD1; entity.TO_TEMPLATE_FIELD2 = model.TO_TEMPLATE_FIELD2; entity.TO_TEMPLATE_FIELD3 = model.TO_TEMPLATE_FIELD3; entity.TO_TEMPLATE_FIELD4 = model.TO_TEMPLATE_FIELD4; entity.TO_TEMPLATE_FIELD5 = model.TO_TEMPLATE_FIELD5; entity.FROM_ZONE = model.FROM_ZONE; entity.CONVERTED_QTY = model.CONVERTED_QTY; entity.CONVERTED_QTY_UM = model.CONVERTED_QTY_UM; entity.TASK_CREATED = model.TASK_CREATED; entity.TRANSFER_ID = model.TRANSFER_ID; entity.INTERNAL_TRANSFER_NUM = model.INTERNAL_TRANSFER_NUM; entity.INTERNAL_TRANSFER_LINE_NUM = model.INTERNAL_TRANSFER_LINE_NUM; entity.CREATED_USER = model.CREATED_USER; entity.CREATED_DATE_TIME = model.CREATED_DATE_TIME; entity.INTERNAL_WAVE_NUM = model.INTERNAL_WAVE_NUM; entity.CART_ID = model.CART_ID; entity.TO_ZONE = model.TO_ZONE; entity.CART_POS = model.CART_POS; m_Rep.Create(entity); }
public virtual void Modify(ref ValidationErrors errors, Apps.Models.SCV.TRANSFER.TRANSFER_LOCATE_REQUEST_MODEL model, params string[] updateProperties) { Apps.Models.TRANSFER_LOCATE_REQUEST entity = m_Rep.GetById(model.INTERNAL_TRANS_LOC_NUM); if (entity == null) { errors.Add(Resource.Disable); return; } if (updateProperties.Count() <= 0) { entity.INTERNAL_TRANS_LOC_NUM = model.INTERNAL_TRANS_LOC_NUM; entity.WAREHOUSE = model.WAREHOUSE; entity.COMPANY = model.COMPANY; entity.ITEM = model.ITEM; entity.ITEM_DESC = model.ITEM_DESC; entity.LOCATE_QTY = model.LOCATE_QTY; entity.QUANTITY_UM = model.QUANTITY_UM; entity.ATTRIBUTE_NUM = model.ATTRIBUTE_NUM; entity.INVENTORY_STS = model.INVENTORY_STS; entity.FROM_LOC = model.FROM_LOC; entity.TO_LOC = model.TO_LOC; entity.FROM_LPN = model.FROM_LPN; entity.FROM_TEMPLATE_FIELD1 = model.FROM_TEMPLATE_FIELD1; entity.FROM_TEMPLATE_FIELD2 = model.FROM_TEMPLATE_FIELD2; entity.FROM_TEMPLATE_FIELD3 = model.FROM_TEMPLATE_FIELD3; entity.FROM_TEMPLATE_FIELD4 = model.FROM_TEMPLATE_FIELD4; entity.FROM_TEMPLATE_FIELD5 = model.FROM_TEMPLATE_FIELD5; entity.TO_TEMPLATE_FIELD1 = model.TO_TEMPLATE_FIELD1; entity.TO_TEMPLATE_FIELD2 = model.TO_TEMPLATE_FIELD2; entity.TO_TEMPLATE_FIELD3 = model.TO_TEMPLATE_FIELD3; entity.TO_TEMPLATE_FIELD4 = model.TO_TEMPLATE_FIELD4; entity.TO_TEMPLATE_FIELD5 = model.TO_TEMPLATE_FIELD5; entity.FROM_ZONE = model.FROM_ZONE; entity.CONVERTED_QTY = model.CONVERTED_QTY; entity.CONVERTED_QTY_UM = model.CONVERTED_QTY_UM; entity.TASK_CREATED = model.TASK_CREATED; entity.TRANSFER_ID = model.TRANSFER_ID; entity.INTERNAL_TRANSFER_NUM = model.INTERNAL_TRANSFER_NUM; entity.INTERNAL_TRANSFER_LINE_NUM = model.INTERNAL_TRANSFER_LINE_NUM; entity.CREATED_USER = model.CREATED_USER; entity.CREATED_DATE_TIME = model.CREATED_DATE_TIME; entity.INTERNAL_WAVE_NUM = model.INTERNAL_WAVE_NUM; entity.CART_ID = model.CART_ID; entity.TO_ZONE = model.TO_ZONE; entity.CART_POS = model.CART_POS; } else { Type type = typeof(Apps.Models.SCV.TRANSFER.TRANSFER_LOCATE_REQUEST_MODEL); Type typeE = typeof(Apps.Models.TRANSFER_LOCATE_REQUEST); foreach (var item in updateProperties) { System.Reflection.PropertyInfo pi = type.GetProperty(item); System.Reflection.PropertyInfo piE = typeE.GetProperty(item); piE.SetValue(entity, pi.GetValue(model), null); } } m_Rep.Modify(entity, updateProperties); }