public static bool VerifyFieldsLength(this RMARequestInfo request) { if (request != null) { CommonCheck.VerifyLength("RequestID", request.RequestID, 20); CommonCheck.VerifyLength("Address", request.Address, 200); CommonCheck.VerifyLength("Contact", request.Contact, 50); CommonCheck.VerifyLength("Phone", request.Phone, 50); CommonCheck.VerifyLength("Note", request.Note, 200); CommonCheck.VerifyLength("Memo", request.Memo, 200); CommonCheck.VerifyLength("ShipViaCode", request.ShipViaCode, 50); CommonCheck.VerifyLength("TrackingNumber", request.TrackingNumber, 50); CommonCheck.VerifyLength("ReceiveWarehouse", request.ReceiveWarehouse, 4); } return(true); }
public static bool VerifyFieldsLength(this RMARegisterInfo register) { if (register != null) { CommonCheck.VerifyLength(ResouceManager.GetMessageString("RMA.Request", "RegisterCheck-CustomerDesc"), register.BasicInfo.CustomerDesc, 500); CommonCheck.VerifyLength(ResouceManager.GetMessageString("RMA.Request", "RegisterCheck-Memo"), register.BasicInfo.Memo, 3000); CommonCheck.VerifyLength(ResouceManager.GetMessageString("RMA.Request", "RegisterCheck-SerialNumber"), register.BasicInfo.ProductNo, 50); CommonCheck.VerifyLength(ResouceManager.GetMessageString("RMA.Request", "RegisterCheck-LocationWarehouse"), register.BasicInfo.LocationWarehouse, 4); CommonCheck.VerifyLength(ResouceManager.GetMessageString("RMA.Request", "RegisterCheck-LocationWarehouse"), register.BasicInfo.OwnByWarehouse, 4); CommonCheck.VerifyLength(ResouceManager.GetMessageString("RMA.Request", "RegisterCheck-ShippedWarehouse"), register.BasicInfo.ShippedWarehouse, 4); CommonCheck.VerifyLength(ResouceManager.GetMessageString("RMA.Request", "RegisterCheck-ShippedWarehouse"), register.CheckInfo.CheckDesc, 1000); CommonCheck.VerifyLength(ResouceManager.GetMessageString("RMA.Request", "RegisterCheck-InspectionResultType"), register.CheckInfo.InspectionResultType, 100); CommonCheck.VerifyLength(ResouceManager.GetMessageString("RMA.Request", "RegisterCheck-ResponseDesc"), register.ResponseInfo.ResponseDesc, 1000); CommonCheck.VerifyLength(ResouceManager.GetMessageString("RMA.Request", "RegisterCheck-ResponseProductNo"), register.ResponseInfo.ResponseProductNo, 50); CommonCheck.VerifyLength(ResouceManager.GetMessageString("RMA.Request", "RegisterCheck-VendorRepairResultType"), register.ResponseInfo.VendorRepairResultType, 100); CommonCheck.VerifyLength(ResouceManager.GetMessageString("RMA.Request", "RegisterCheck-RequestMsg"), register.RevertInfo.RevertAuditMemo, 200); } return(true); }